1
0
mirror of https://github.com/robertkrimen/otto synced 2025-10-12 20:27:30 +08:00
otto/parser
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 chore: rename _parser (#483) 2022-12-07 00:23:10 +00:00
error.go chore: rename _parser (#483) 2022-12-07 00:23:10 +00:00
expression.go fix: positions of expressions (#505) 2023-07-21 22:47:33 +01:00
lexer_test.go chore: rename _parser (#483) 2022-12-07 00:23:10 +00:00
lexer.go ci: fix lint failures (#502) 2023-07-16 19:17:11 +01:00
marshal_test.go chore: lint and naming refactor (#475) 2022-12-04 21:49:38 +00:00
parser_test.go fix: positions of statements (#506) 2023-07-25 18:25:01 +01:00
parser.go chore: rename _parser (#483) 2022-12-07 00:23:10 +00:00
regexp_test.go terst 2014-04-25 22:48:25 -07:00
regexp.go chore: rename _parser (#483) 2022-12-07 00:23:10 +00:00
scope.go chore: rename _parser (#483) 2022-12-07 00:23:10 +00:00
statement.go fix: positions of statements (#506) 2023-07-25 18:25:01 +01:00