1
0
mirror of https://github.com/robertkrimen/otto synced 2025-10-05 19:19:10 +08:00
otto/ast
Tomoki Yamaguchi 11288b7564
fix: positions of statements (#506)
Fix the positions of various statements:
* Fix Idx1 of BranchStatement so that it points to the character after the label if Label exists,
  or the one after Token if Label does not exist.
* Fix Idx1 of LabelledStatement so that it points to the character after the statement.
* Fix Idx1 of ReturnStatement so that it points to the character after the argument if
  Argument exists, or the one after return keyword if Argument does not exist.
* Set Idx0 of SwitchStatement and fix Idx1 of SwitchStatement so that it points to the
  character after the right brace.
* Fix Idx0 of ThrowStatement to point to the start of throw keyword and fix Idx1 of
  ThrowStatement so that it points to the next character after Argument.
* Fix Idx1 of TryStatement to point to the character after Finally if Finally exists, or after Catch
  if Finally does not exist.
* Set Idx0 of WithStatement which was not previously set.
* Set WhileStatement.While so that Idx0 points to the right place.
* Set Idx0 of DoWhileStatement and fix Idx1 to point to the next character after the right
  parenthesis.
2023-07-25 18:25:01 +01:00
..
comments_test.go feat: add github action tests and linting (#418) 2021-09-27 16:19:28 +01:00
comments.go chore: lint and naming refactor (#475) 2022-12-04 21:49:38 +00:00
node.go fix: positions of statements (#506) 2023-07-25 18:25:01 +01:00
walk_example_test.go Walk/Visitor should follow Enter/Exit Pattern (#258) 2017-07-21 20:42:34 +01:00
walk_test.go fix: panic on BadStatement (#495) 2023-05-20 13:35:41 +01:00
walk.go fix: panic on BadStatement (#495) 2023-05-20 13:35:41 +01:00