mirror of
https://github.com/github/semantic.git
synced 2024-12-22 06:11:49 +03:00
Add SubscriptAccess Syntax
This commit is contained in:
parent
4f5141c59e
commit
596d465c17
@ -36,6 +36,9 @@ data Syntax
|
|||||||
| VarDecl f
|
| VarDecl f
|
||||||
-- | A variable assignment in a variable declaration. var foo = bar;
|
-- | A variable assignment in a variable declaration. var foo = bar;
|
||||||
| VarAssignment { varId :: f, varValue :: f }
|
| VarAssignment { varId :: f, varValue :: f }
|
||||||
|
-- | A subscript access contains a syntax, and another syntax that indefies a property or value in the first syntax.
|
||||||
|
-- | e.g. in Javascript x["y"] represents a subscript access syntax.
|
||||||
|
| SubscriptAccess { subscriptId :: f, subscriptElement :: f }
|
||||||
| Switch { switchExpr :: f, cases :: [f] }
|
| Switch { switchExpr :: f, cases :: [f] }
|
||||||
| Case { caseExpr :: f, caseStatements :: f }
|
| Case { caseExpr :: f, caseStatements :: f }
|
||||||
deriving (Functor, Show, Eq, Foldable, Traversable)
|
deriving (Functor, Show, Eq, Foldable, Traversable)
|
||||||
|
Loading…
Reference in New Issue
Block a user