Skip to content

Commit

Permalink
parser: allow new_expressiona and function_call to be object accessed
Browse files Browse the repository at this point in the history
  • Loading branch information
jkbz64 committed Sep 18, 2024
1 parent 06892d6 commit b3b9e48
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,10 @@ module.exports = grammar({

object_access: ($) =>
seq(
field("object", $.identifier),
field(
"object",
choice($.identifier, $.new_expression, $.function_call)
),
repeat1(seq(alias($._namecolon, ":"), field("property", $.identifier)))
),

Expand Down
3 changes: 3 additions & 0 deletions test/corpus/basic.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1175,6 +1175,9 @@ DISPLAY some_object:chained_property:chained_another:method().

PUT some_object:array[5].

Object:Length = new OpenEdge.Core.String(pcMessage):Size.
oObject:Length -= String(pcMessage):Size.

--------------------------------------------------------------------------------

(source_code
Expand Down

0 comments on commit b3b9e48

Please sign in to comment.