|
|
|
@ -71,6 +71,11 @@ type Quote struct {
|
|
|
|
|
Value Quotation `parser:"'#' @@"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type PropertyAccess struct {
|
|
|
|
|
Receiver IdentifierOrParenthesis `parser:"@@"`
|
|
|
|
|
Accesses []IdentifierOrParenthesis `parser:"('.' @@)*"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Quotation interface{}
|
|
|
|
|
|
|
|
|
|
type ExpressionFactor interface{}
|
|
|
|
@ -81,6 +86,8 @@ type BinaryOperation struct {
|
|
|
|
|
Rhs Expression `parser:" @@ )?"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type IdentifierOrParenthesis interface{}
|
|
|
|
|
|
|
|
|
|
var (
|
|
|
|
|
scriptLexer = lexer.MustSimple([]lexer.SimpleRule{
|
|
|
|
|
{Name: "Comment", Pattern: `--[^\n]*\n?`},
|
|
|
|
@ -128,6 +135,10 @@ var (
|
|
|
|
|
&Identifier{},
|
|
|
|
|
&ParenthesizedExpression{},
|
|
|
|
|
),
|
|
|
|
|
participle.Union[IdentifierOrParenthesis](
|
|
|
|
|
&Identifier{},
|
|
|
|
|
&ParenthesizedExpression{},
|
|
|
|
|
),
|
|
|
|
|
participle.UseLookahead(2),
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|