1
1
mirror of https://github.com/github/semantic.git synced 2024-12-29 18:06:14 +03:00

Merge pull request from github/parens

Preserve parentheses in syntax trees.
This commit is contained in:
Josh Vera 2018-04-06 13:21:10 -04:00 committed by GitHub
commit 1b9b8611ba
87 changed files with 480 additions and 322 deletions
src
test/fixtures
go
javascript
python
typescript

View File

@ -146,6 +146,17 @@ instance Show1 Empty where liftShowsPrec _ _ _ _ = showString "Empty"
instance Evaluatable Empty where
eval _ = unit
-- | A parenthesized expression or statement. All the languages we target support this concept.
newtype Paren a = Paren a
deriving (Diffable, Eq, Foldable, Functor, GAlign, Generic1, Mergeable, Ord, Show, Traversable, FreeVariables1)
instance Eq1 Paren where liftEq = genericLiftEq
instance Ord1 Paren where liftCompare = genericLiftCompare
instance Show1 Paren where liftShowsPrec = genericLiftShowsPrec
instance Evaluatable Paren where
eval (Paren a) = subtermValue a
-- | Syntax representing a parsing or assignment error.
data Error a = Error { errorCallStack :: ErrorStack, errorExpected :: [String], errorActual :: Maybe String, errorChildren :: [a] }

View File

@ -89,6 +89,7 @@ type Syntax =
, Syntax.Error
, Syntax.Empty
, Syntax.Identifier
, Syntax.Paren
, Syntax.Program
, Type.Annotation
, Type.Array
@ -428,7 +429,7 @@ parameterDeclaration :: Assignment
parameterDeclaration = makeTerm <$> symbol ParameterDeclaration <*> children (manyTerm expression)
parenthesizedExpression :: Assignment
parenthesizedExpression = symbol ParenthesizedExpression *> children expressions
parenthesizedExpression = makeTerm <$> symbol ParenthesizedExpression <*> (Syntax.Paren <$> children expressions)
selectorExpression :: Assignment
selectorExpression = makeTerm <$> symbol SelectorExpression <*> children (Expression.MemberAccess <$> expression <*> expression)

View File

@ -103,6 +103,7 @@ type Syntax = '[
, Syntax.NamespaceUseDeclaration
, Syntax.NamespaceUseGroupClause
, Syntax.NewVariable
, Syntax.Paren
, Syntax.PrintIntrinsic
, Syntax.Program
, Syntax.PropertyDeclaration
@ -287,7 +288,7 @@ primaryExpression = choice [
]
parenthesizedExpression :: Assignment
parenthesizedExpression = symbol ParenthesizedExpression *> children (term expression)
parenthesizedExpression = makeTerm <$> symbol ParenthesizedExpression <*> (Syntax.Paren <$> children (term expression))
classConstantAccessExpression :: Assignment
classConstantAccessExpression = makeTerm <$> symbol ClassConstantAccessExpression <*> children (Expression.MemberAccess <$> term scopeResolutionQualifier <*> term name)

View File

@ -79,6 +79,7 @@ type Syntax =
, Syntax.Empty
, Syntax.Error
, Syntax.Identifier
, Syntax.Paren
, Syntax.Program
, Type.Annotation
, []
@ -190,7 +191,7 @@ keywordArgument :: Assignment
keywordArgument = makeTerm <$> symbol KeywordArgument <*> children (Statement.Assignment [] <$> term expression <*> term expression)
parenthesizedExpression :: Assignment
parenthesizedExpression = symbol ParenthesizedExpression *> children expressions
parenthesizedExpression = makeTerm <$> symbol ParenthesizedExpression <*> (Syntax.Paren <$> children expressions)
parameter :: Assignment
parameter = makeTerm <$> symbol DefaultParameter <*> children (Statement.Assignment [] <$> term expression <*> term expression)

View File

@ -72,6 +72,7 @@ type Syntax = '[
, Syntax.Empty
, Syntax.Error
, Syntax.Identifier
, Syntax.Paren
, Syntax.Program
, Ruby.Syntax.Class
, Ruby.Syntax.Load
@ -141,7 +142,7 @@ expressions :: Assignment
expressions = makeTerm'' <$> location <*> many expression
parenthesizedExpressions :: Assignment
parenthesizedExpressions = makeTerm'' <$> symbol ParenthesizedStatements <*> children (many expression)
parenthesizedExpressions = makeTerm'' <$> symbol ParenthesizedStatements <*> children (Syntax.Paren <$> expressions)
identifier :: Assignment
identifier =

View File

@ -86,6 +86,7 @@ type Syntax = '[
, Syntax.Empty
, Syntax.Error
, Syntax.Identifier
, Syntax.Paren
, Syntax.Program
, Syntax.Context
, Type.Readonly
@ -783,7 +784,7 @@ variableDeclarator = makeVarDecl <$> symbol VariableDeclarator <*> children ((,,
where makeVarDecl loc (subject, annotations, value) = makeTerm loc (Statement.Assignment [annotations] subject value)
parenthesizedExpression :: Assignment
parenthesizedExpression = symbol ParenthesizedExpression *> children (term expressions)
parenthesizedExpression = makeTerm <$> symbol ParenthesizedExpression <*> (Syntax.Paren <$> children (term expressions))
switchStatement :: Assignment
switchStatement = makeTerm <$> symbol SwitchStatement <*> children (Statement.Match <$> term parenthesizedExpression <*> term switchBody)

View File

@ -18,9 +18,10 @@
(SendChannel
{ (Identifier)
->(Identifier) })
(Minus
(Identifier)
(Identifier)))
(Paren
(Minus
(Identifier)
(Identifier))))
(Empty))
(Call
(Identifier)

View File

@ -18,9 +18,10 @@
(SendChannel
{ (Identifier)
->(Identifier) })
(Minus
(Identifier)
(Identifier)))
(Paren
(Minus
(Identifier)
(Identifier))))
(Empty))
(Call
(Identifier)

View File

@ -16,9 +16,10 @@
(
(SendChannel
(Identifier))
(Minus
(Identifier)
(Identifier)))
(Paren
(Minus
(Identifier)
(Identifier))))
(Empty))
(Call
(Identifier)

View File

@ -16,9 +16,10 @@
(
(SendChannel
(Identifier))
(Minus
(Identifier)
(Identifier)))
(Paren
(Minus
(Identifier)
(Identifier))))
(Empty))
(Call
(Identifier)

View File

@ -13,8 +13,9 @@
->(Identifier) }
(Empty)))
(Call
(Pointer
(Identifier))
(Paren
(Pointer
(Identifier)))
{ (Identifier)
->(Identifier) }
(Empty))
@ -55,46 +56,63 @@
(Identifier))
{ (Identifier)
->(Identifier) })
(TypeConversion
(Slice
(MemberAccess
{ (Identifier)
->(Identifier) }
{ (Identifier)
->(Identifier) }))
(MemberAccess
{ (Identifier)
->(Identifier) }
{ (Identifier)
->(Identifier) }))
(TypeConversion
(Parenthesized
(Slice
(MemberAccess
{ (Identifier)
->(Identifier) }
{ (Identifier)
->(Identifier) })))
(MemberAccess
{ (Identifier)
->(Identifier) }
{ (Identifier)
->(Identifier) }))
(Call
(MemberAccess
{ (Identifier)
->(Identifier) }
{ (Identifier)
->(Identifier) })
{ (Identifier)
->(Identifier) }
(Empty))
(Call
(MemberAccess
{ (Identifier)
->(Identifier) }
{ (Identifier)
->(Identifier) })
{ (Identifier)
->(Identifier) }
(Empty)))))
{+(TypeConversion
{+(Slice
{+(MemberAccess
{+(Identifier)+}
{+(Identifier)+})+})+}
{+(MemberAccess
{+(Identifier)+}
{+(Identifier)+})+})+}
{+(TypeConversion
{+(Parenthesized
{+(Slice
{+(MemberAccess
{+(Identifier)+}
{+(Identifier)+})+})+})+}
{+(MemberAccess
{+(Identifier)+}
{+(Identifier)+})+})+}
{+(Call
{+(MemberAccess
{+(Identifier)+}
{+(Identifier)+})+}
{+(Identifier)+}
{+(Empty)+})+}
{+(Call
{+(Paren
{+(MemberAccess
{+(Identifier)+}
{+(Identifier)+})+})+}
{+(Identifier)+}
{+(Empty)+})+}
{-(TypeConversion
{-(Slice
{-(MemberAccess
{-(Identifier)-}
{-(Identifier)-})-})-}
{-(MemberAccess
{-(Identifier)-}
{-(Identifier)-})-})-}
{-(TypeConversion
{-(Parenthesized
{-(Slice
{-(MemberAccess
{-(Identifier)-}
{-(Identifier)-})-})-})-}
{-(MemberAccess
{-(Identifier)-}
{-(Identifier)-})-})-}
{-(Call
{-(MemberAccess
{-(Identifier)-}
{-(Identifier)-})-}
{-(Identifier)-}
{-(Empty)-})-}
{-(Call
{-(Paren
{-(MemberAccess
{-(Identifier)-}
{-(Identifier)-})-})-}
{-(Identifier)-}
{-(Empty)-})-})))

View File

@ -13,8 +13,9 @@
->(Identifier) }
(Empty)))
(Call
(Pointer
(Identifier))
(Paren
(Pointer
(Identifier)))
{ (Identifier)
->(Identifier) }
(Empty))
@ -55,46 +56,61 @@
(Identifier))
{ (Identifier)
->(Identifier) })
{+(TypeConversion
{+(Slice
{+(MemberAccess
{+(Identifier)+}
{+(Identifier)+})+})+}
{+(MemberAccess
{+(Identifier)+}
{+(Identifier)+})+})+}
(TypeConversion
(Slice
(MemberAccess
{ (Identifier)
->(Identifier) }
{ (Identifier)
->(Identifier) }))
{ (Slice
{-(MemberAccess
{-(Identifier)-}
{-(Identifier)-})-})
->(Parenthesized
{+(Slice
{+(MemberAccess
{+(Identifier)+}
{+(Identifier)+})+})+}) }
(MemberAccess
{ (Identifier)
->(Identifier) }
{ (Identifier)
->(Identifier) }))
(TypeConversion
(Parenthesized
(Slice
(MemberAccess
{ (Identifier)
->(Identifier) }
{ (Identifier)
->(Identifier) })))
(MemberAccess
{ (Identifier)
->(Identifier) }
{ (Identifier)
->(Identifier) }))
(Call
(MemberAccess
{ (Identifier)
->(Identifier) }
{ (Identifier)
->(Identifier) })
{ (Identifier)
->(Identifier) }
(Empty))
(Call
(MemberAccess
{ (Identifier)
->(Identifier) }
{ (Identifier)
->(Identifier) })
{ (Identifier)
->(Identifier) }
(Empty)))))
{+(Call
{+(MemberAccess
{+(Identifier)+}
{+(Identifier)+})+}
{+(Identifier)+}
{+(Empty)+})+}
{+(Call
{+(Paren
{+(MemberAccess
{+(Identifier)+}
{+(Identifier)+})+})+}
{+(Identifier)+}
{+(Empty)+})+}
{-(TypeConversion
{-(Parenthesized
{-(Slice
{-(MemberAccess
{-(Identifier)-}
{-(Identifier)-})-})-})-}
{-(MemberAccess
{-(Identifier)-}
{-(Identifier)-})-})-}
{-(Call
{-(MemberAccess
{-(Identifier)-}
{-(Identifier)-})-}
{-(Identifier)-}
{-(Empty)-})-}
{-(Call
{-(Paren
{-(MemberAccess
{-(Identifier)-}
{-(Identifier)-})-})-}
{-(Identifier)-}
{-(Empty)-})-})))

View File

@ -12,8 +12,9 @@
(Identifier)
(Empty)))
(Call
(Pointer
(Identifier))
(Paren
(Pointer
(Identifier)))
(Identifier)
(Empty))
(TypeConversion
@ -71,8 +72,9 @@
(Identifier)
(Empty))
(Call
(MemberAccess
(Identifier)
(Identifier))
(Paren
(MemberAccess
(Identifier)
(Identifier)))
(Identifier)
(Empty)))))

View File

@ -12,8 +12,9 @@
(Identifier)
(Empty)))
(Call
(Pointer
(Identifier))
(Paren
(Pointer
(Identifier)))
(Identifier)
(Empty))
(TypeConversion
@ -71,8 +72,9 @@
(Identifier)
(Empty))
(Call
(MemberAccess
(Identifier)
(Identifier))
(Paren
(MemberAccess
(Identifier)
(Identifier)))
(Identifier)
(Empty)))))

View File

@ -10,9 +10,10 @@
(Identifier))
(
(If
(Equal
(Identifier)
(Float))
(Paren
(Equal
(Identifier)
(Float)))
(
{+(Continue
{+(Empty)+})+}

View File

@ -10,9 +10,10 @@
(Identifier))
(
(If
(Equal
(Identifier)
(Float))
(Paren
(Equal
(Identifier)
(Float)))
(
{+(Break
{+(Empty)+})+}

View File

@ -10,9 +10,10 @@
(Identifier))
(
(If
(Equal
(Identifier)
(Float))
(Paren
(Equal
(Identifier)
(Float)))
(
(Break
(Empty)))

View File

@ -10,9 +10,10 @@
(Identifier))
(
(If
(Equal
(Identifier)
(Float))
(Paren
(Equal
(Identifier)
(Float)))
(
(Continue
(Empty)))

View File

@ -4,13 +4,14 @@
{+(Hash
{+(KeyValue
{+(Identifier)+}
{+(SequenceExpression
{+(Float)+}
{+(Paren
{+(SequenceExpression
{+(Plus
{+(Float)+}
{+(Float)+})+}
{+(Float)+})+})+})+})+})+}
{+(Float)+}
{+(SequenceExpression
{+(Plus
{+(Float)+}
{+(Float)+})+}
{+(Float)+})+})+})+})+})+})+}
{-(SequenceExpression
{-(Assignment
{-(Identifier)-}

View File

@ -11,10 +11,11 @@
{-(Hash
{-(KeyValue
{-(Identifier)-}
{-(SequenceExpression
{-(Float)-}
{-(Paren
{-(SequenceExpression
{-(Plus
{-(Float)-}
{-(Float)-})-}
{-(Float)-})-})-})-})-})-})
{-(Float)-}
{-(SequenceExpression
{-(Plus
{-(Float)-}
{-(Float)-})-}
{-(Float)-})-})-})-})-})-})-})

View File

@ -4,10 +4,11 @@
(Hash
(KeyValue
(Identifier)
(SequenceExpression
(Float)
(Paren
(SequenceExpression
(Plus
(Float)
(Float))
(Float)))))))
(Float)
(SequenceExpression
(Plus
(Float)
(Float))
(Float))))))))

View File

@ -10,9 +10,10 @@
(Identifier))
(
(If
(Equal
(Identifier)
(Float))
(Paren
(Equal
(Identifier)
(Float)))
(
{+(Break
{+(Empty)+})+}

View File

@ -10,9 +10,10 @@
(Identifier))
(
(If
(Equal
(Identifier)
(Float))
(Paren
(Equal
(Identifier)
(Float)))
(
{+(Continue
{+(Empty)+})+}

View File

@ -10,9 +10,10 @@
(Identifier))
(
(If
(Equal
(Identifier)
(Float))
(Paren
(Equal
(Identifier)
(Float)))
(
(Continue
(Empty)))

View File

@ -10,9 +10,10 @@
(Identifier))
(
(If
(Equal
(Identifier)
(Float))
(Paren
(Equal
(Identifier)
(Float)))
(
(Break
(Empty)))

View File

@ -1,7 +1,8 @@
(Program
(DoWhile
{ (Boolean)
->(Boolean) }
(Paren
{ (Boolean)
->(Boolean) })
(
(Call
(MemberAccess

View File

@ -1,7 +1,8 @@
(Program
(DoWhile
{ (Boolean)
->(Boolean) }
(Paren
{ (Boolean)
->(Boolean) })
(
(Call
(MemberAccess

View File

@ -1,6 +1,7 @@
(Program
(DoWhile
(Boolean)
(Paren
(Boolean))
(
(Call
(MemberAccess

View File

@ -1,6 +1,7 @@
(Program
(DoWhile
(Boolean)
(Paren
(Boolean))
(
(Call
(MemberAccess

View File

@ -1,23 +1,27 @@
(Program
(If
{ (Identifier)
->(Identifier) }
(Paren
{ (Identifier)
->(Identifier) })
{ (Identifier)
->(Identifier) }
(If
{ (Identifier)
->(Identifier) }
(Paren
{ (Identifier)
->(Identifier) })
{ (Identifier)
->(
{+(Identifier)+}) }
(If
{ (Identifier)
->(Identifier) }
(Paren
{ (Identifier)
->(Identifier) })
{ (Identifier)
->(Identifier) }
(If
{ (Identifier)
->(Identifier) }
(Paren
{ (Identifier)
->(Identifier) })
{ (Identifier)
->(
{+(Identifier)+}) }

View File

@ -1,23 +1,27 @@
(Program
(If
{ (Identifier)
->(Identifier) }
(Paren
{ (Identifier)
->(Identifier) })
{ (Identifier)
->(Identifier) }
(If
{ (Identifier)
->(Identifier) }
(Paren
{ (Identifier)
->(Identifier) })
{ (
{-(Identifier)-})
->(Identifier) }
(If
{ (Identifier)
->(Identifier) }
(Paren
{ (Identifier)
->(Identifier) })
{ (Identifier)
->(Identifier) }
(If
{ (Identifier)
->(Identifier) }
(Paren
{ (Identifier)
->(Identifier) })
{ (
{-(Identifier)-})
->(Identifier) }

View File

@ -1,14 +1,18 @@
(Program
(If
(Identifier)
(Paren
(Identifier))
(Identifier)
(If
(Identifier)
(Paren
(Identifier))
(Identifier)
(If
(Identifier)
(Paren
(Identifier))
(Identifier)
(If
(Identifier)
(Paren
(Identifier))
(Identifier)
(Identifier))))))

View File

@ -1,16 +1,20 @@
(Program
(If
(Identifier)
(Paren
(Identifier))
(Identifier)
(If
(Identifier)
(Paren
(Identifier))
(
(Identifier))
(If
(Identifier)
(Paren
(Identifier))
(Identifier)
(If
(Identifier)
(Paren
(Identifier))
(
(Identifier))
(Identifier))))))

View File

@ -1,9 +1,10 @@
(Program
(If
{ (Identifier)
->(MemberAccess
{+(Identifier)+}
{+(Identifier)+}) }
(Paren
{ (Identifier)
->(MemberAccess
{+(Identifier)+}
{+(Identifier)+}) })
(
(Call
(Identifier)

View File

@ -1,9 +1,10 @@
(Program
(If
{ (MemberAccess
{-(Identifier)-}
{-(Identifier)-})
->(Identifier) }
(Paren
{ (MemberAccess
{-(Identifier)-}
{-(Identifier)-})
->(Identifier) })
(
(Call
(Identifier)

View File

@ -1,6 +1,7 @@
(Program
(If
(Identifier)
(Paren
(Identifier))
(
(Call
(Identifier)

View File

@ -1,8 +1,9 @@
(Program
(If
(MemberAccess
(Identifier)
(Identifier))
(Paren
(MemberAccess
(Identifier)
(Identifier)))
(
(Call
(Identifier)

View File

@ -19,8 +19,9 @@
(Empty)))
(
(DoWhile
{ (Identifier)
->(Identifier) }
(Paren
{ (Identifier)
->(Identifier) })
(
(Call
(Identifier)

View File

@ -19,8 +19,9 @@
(Empty)))
(
(DoWhile
{ (Identifier)
->(Identifier) }
(Paren
{ (Identifier)
->(Identifier) })
(
(Call
(Identifier)

View File

@ -19,7 +19,8 @@
(Empty)))
(
(DoWhile
(Identifier)
(Paren
(Identifier))
(
(Call
(Identifier)

View File

@ -19,7 +19,8 @@
(Empty)))
(
(DoWhile
(Identifier)
(Paren
(Identifier))
(
(Call
(Identifier)

View File

@ -1,7 +1,8 @@
(Program
(Match
{ (Float)
->(Float) }
(Paren
{ (Float)
->(Float) })
(
(Pattern
(Float)

View File

@ -1,7 +1,8 @@
(Program
(Match
{ (Float)
->(Float) }
(Paren
{ (Float)
->(Float) })
(
(Pattern
(Float)

View File

@ -1,6 +1,7 @@
(Program
(Match
(Float)
(Paren
(Float))
(
(Pattern
(Float)

View File

@ -1,6 +1,7 @@
(Program
(Match
(Float)
(Paren
(Float))
(
(Pattern
(Float)

View File

@ -1,7 +1,8 @@
(Program
(While
{ (Identifier)
->(Identifier) }
(Paren
{ (Identifier)
->(Identifier) })
(
(Call
{ (Identifier)

View File

@ -1,7 +1,8 @@
(Program
(While
{ (Identifier)
->(Identifier) }
(Paren
{ (Identifier)
->(Identifier) })
(
(Call
{ (Identifier)

View File

@ -1,6 +1,7 @@
(Program
(While
(Identifier)
(Paren
(Identifier))
(
(Call
(Identifier)

View File

@ -1,6 +1,7 @@
(Program
(While
(Identifier)
(Paren
(Identifier))
(
(Call
(Identifier)

View File

@ -7,7 +7,8 @@
{-(Identifier)-}
(Identifier)
{+(Identifier)+})
{+(Identifier)+}
{+(Paren
{+(Identifier)+})+}
{-(Tuple
{-(Identifier)-}
{-(Identifier)-}

View File

@ -2,12 +2,16 @@
{+(Tuple
{+(Identifier)+}
{+(Identifier)+})+}
(Tuple
{+(Tuple
{+(Identifier)+}
(Identifier)
(Identifier)
{-(Identifier)-})
{+(Identifier)+}
{+(Identifier)+})+}
{-(Tuple
{-(Identifier)-}
{-(Identifier)-}
{-(Identifier)-})-}
{-(Tuple
{-(Identifier)-}
{-(Identifier)-})-}
{-(Identifier)-})
{-(Paren
{-(Identifier)-})-})

View File

@ -6,4 +6,5 @@
(Tuple
(Identifier)
(Identifier))
(Identifier))
(Paren
(Identifier)))

View File

@ -10,9 +10,10 @@
(Identifier))
(
(If
(Equal
(Identifier)
(Float))
(Paren
(Equal
(Identifier)
(Float)))
(
{+(Continue
{+(Empty)+})+}

View File

@ -10,9 +10,10 @@
(Identifier))
(
(If
(Equal
(Identifier)
(Float))
(Paren
(Equal
(Identifier)
(Float)))
(
{+(Break
{+(Empty)+})+}

View File

@ -10,9 +10,10 @@
(Identifier))
(
(If
(Equal
(Identifier)
(Float))
(Paren
(Equal
(Identifier)
(Float)))
(
(Break
(Empty)))

View File

@ -10,9 +10,10 @@
(Identifier))
(
(If
(Equal
(Identifier)
(Float))
(Paren
(Equal
(Identifier)
(Float)))
(
(Continue
(Empty)))

View File

@ -4,13 +4,14 @@
{+(Hash
{+(KeyValue
{+(Identifier)+}
{+(SequenceExpression
{+(Float)+}
{+(Paren
{+(SequenceExpression
{+(Plus
{+(Float)+}
{+(Float)+})+}
{+(Float)+})+})+})+})+})+}
{+(Float)+}
{+(SequenceExpression
{+(Plus
{+(Float)+}
{+(Float)+})+}
{+(Float)+})+})+})+})+})+})+}
{-(SequenceExpression
{-(Assignment
{-(Identifier)-}

View File

@ -11,10 +11,11 @@
{-(Hash
{-(KeyValue
{-(Identifier)-}
{-(SequenceExpression
{-(Float)-}
{-(Paren
{-(SequenceExpression
{-(Plus
{-(Float)-}
{-(Float)-})-}
{-(Float)-})-})-})-})-})-})
{-(Float)-}
{-(SequenceExpression
{-(Plus
{-(Float)-}
{-(Float)-})-}
{-(Float)-})-})-})-})-})-})-})

View File

@ -4,10 +4,11 @@
(Hash
(KeyValue
(Identifier)
(SequenceExpression
(Float)
(Paren
(SequenceExpression
(Plus
(Float)
(Float))
(Float)))))))
(Float)
(SequenceExpression
(Plus
(Float)
(Float))
(Float))))))))

View File

@ -10,9 +10,10 @@
(Identifier))
(
(If
(Equal
(Identifier)
(Float))
(Paren
(Equal
(Identifier)
(Float)))
(
{+(Break
{+(Empty)+})+}

View File

@ -10,9 +10,10 @@
(Identifier))
(
(If
(Equal
(Identifier)
(Float))
(Paren
(Equal
(Identifier)
(Float)))
(
{+(Continue
{+(Empty)+})+}

View File

@ -10,9 +10,10 @@
(Identifier))
(
(If
(Equal
(Identifier)
(Float))
(Paren
(Equal
(Identifier)
(Float)))
(
(Continue
(Empty)))

View File

@ -10,9 +10,10 @@
(Identifier))
(
(If
(Equal
(Identifier)
(Float))
(Paren
(Equal
(Identifier)
(Float)))
(
(Break
(Empty)))

View File

@ -1,7 +1,8 @@
(Program
(DoWhile
{ (Boolean)
->(Boolean) }
(Paren
{ (Boolean)
->(Boolean) })
(
(Call
(MemberAccess

View File

@ -1,7 +1,8 @@
(Program
(DoWhile
{ (Boolean)
->(Boolean) }
(Paren
{ (Boolean)
->(Boolean) })
(
(Call
(MemberAccess

View File

@ -1,6 +1,7 @@
(Program
(DoWhile
(Boolean)
(Paren
(Boolean))
(
(Call
(MemberAccess

View File

@ -1,6 +1,7 @@
(Program
(DoWhile
(Boolean)
(Paren
(Boolean))
(
(Call
(MemberAccess

View File

@ -1,23 +1,27 @@
(Program
(If
{ (Identifier)
->(Identifier) }
(Paren
{ (Identifier)
->(Identifier) })
{ (Identifier)
->(Identifier) }
(If
{ (Identifier)
->(Identifier) }
(Paren
{ (Identifier)
->(Identifier) })
{ (Identifier)
->(
{+(Identifier)+}) }
(If
{ (Identifier)
->(Identifier) }
(Paren
{ (Identifier)
->(Identifier) })
{ (Identifier)
->(Identifier) }
(If
{ (Identifier)
->(Identifier) }
(Paren
{ (Identifier)
->(Identifier) })
{ (Identifier)
->(
{+(Identifier)+}) }

View File

@ -1,23 +1,27 @@
(Program
(If
{ (Identifier)
->(Identifier) }
(Paren
{ (Identifier)
->(Identifier) })
{ (Identifier)
->(Identifier) }
(If
{ (Identifier)
->(Identifier) }
(Paren
{ (Identifier)
->(Identifier) })
{ (
{-(Identifier)-})
->(Identifier) }
(If
{ (Identifier)
->(Identifier) }
(Paren
{ (Identifier)
->(Identifier) })
{ (Identifier)
->(Identifier) }
(If
{ (Identifier)
->(Identifier) }
(Paren
{ (Identifier)
->(Identifier) })
{ (
{-(Identifier)-})
->(Identifier) }

View File

@ -1,14 +1,18 @@
(Program
(If
(Identifier)
(Paren
(Identifier))
(Identifier)
(If
(Identifier)
(Paren
(Identifier))
(Identifier)
(If
(Identifier)
(Paren
(Identifier))
(Identifier)
(If
(Identifier)
(Paren
(Identifier))
(Identifier)
(Identifier))))))

View File

@ -1,16 +1,20 @@
(Program
(If
(Identifier)
(Paren
(Identifier))
(Identifier)
(If
(Identifier)
(Paren
(Identifier))
(
(Identifier))
(If
(Identifier)
(Paren
(Identifier))
(Identifier)
(If
(Identifier)
(Paren
(Identifier))
(
(Identifier))
(Identifier))))))

View File

@ -1,9 +1,10 @@
(Program
(If
{ (Identifier)
->(MemberAccess
{+(Identifier)+}
{+(Identifier)+}) }
(Paren
{ (Identifier)
->(MemberAccess
{+(Identifier)+}
{+(Identifier)+}) })
(
(Call
(Identifier)

View File

@ -1,9 +1,10 @@
(Program
(If
{ (MemberAccess
{-(Identifier)-}
{-(Identifier)-})
->(Identifier) }
(Paren
{ (MemberAccess
{-(Identifier)-}
{-(Identifier)-})
->(Identifier) })
(
(Call
(Identifier)

View File

@ -1,6 +1,7 @@
(Program
(If
(Identifier)
(Paren
(Identifier))
(
(Call
(Identifier)

View File

@ -1,8 +1,9 @@
(Program
(If
(MemberAccess
(Identifier)
(Identifier))
(Paren
(MemberAccess
(Identifier)
(Identifier)))
(
(Call
(Identifier)

View File

@ -19,8 +19,9 @@
(Empty)))
(
(DoWhile
{ (Identifier)
->(Identifier) }
(Paren
{ (Identifier)
->(Identifier) })
(
(Call
(Identifier)

View File

@ -19,8 +19,9 @@
(Empty)))
(
(DoWhile
{ (Identifier)
->(Identifier) }
(Paren
{ (Identifier)
->(Identifier) })
(
(Call
(Identifier)

View File

@ -19,7 +19,8 @@
(Empty)))
(
(DoWhile
(Identifier)
(Paren
(Identifier))
(
(Call
(Identifier)

View File

@ -19,7 +19,8 @@
(Empty)))
(
(DoWhile
(Identifier)
(Paren
(Identifier))
(
(Call
(Identifier)

View File

@ -1,7 +1,8 @@
(Program
(Match
{ (Float)
->(Float) }
(Paren
{ (Float)
->(Float) })
(
(Pattern
(Float)

View File

@ -1,7 +1,8 @@
(Program
(Match
{ (Float)
->(Float) }
(Paren
{ (Float)
->(Float) })
(
(Pattern
(Float)

View File

@ -1,6 +1,7 @@
(Program
(Match
(Float)
(Paren
(Float))
(
(Pattern
(Float)

View File

@ -1,6 +1,7 @@
(Program
(Match
(Float)
(Paren
(Float))
(
(Pattern
(Float)

View File

@ -1,7 +1,8 @@
(Program
(While
{ (Identifier)
->(Identifier) }
(Paren
{ (Identifier)
->(Identifier) })
(
(Call
{ (Identifier)

View File

@ -1,7 +1,8 @@
(Program
(While
{ (Identifier)
->(Identifier) }
(Paren
{ (Identifier)
->(Identifier) })
(
(Call
{ (Identifier)

View File

@ -1,6 +1,7 @@
(Program
(While
(Identifier)
(Paren
(Identifier))
(
(Call
(Identifier)

View File

@ -1,6 +1,7 @@
(Program
(While
(Identifier)
(Paren
(Identifier))
(
(Call
(Identifier)