mirror of
https://github.com/github/semantic.git
synced 2025-01-05 14:11:33 +03:00
Construct variable declarations.
This commit is contained in:
parent
48fdd44d7c
commit
65b5eaa081
@ -146,6 +146,7 @@ javascriptTermConstructor source sourceSpan name range children = withDefaultInf
|
||||
("ternary", (condition:cases)) -> S.Ternary condition cases
|
||||
("arguments", _) -> S.Args children
|
||||
("var_assignment", [ x, y ]) -> S.VarAssignment x y
|
||||
("var_declaration", _) -> S.Indexed $ toVarDecl <$> children
|
||||
(_, []) -> S.Leaf . toText $ slice range source
|
||||
_ -> S.Indexed children
|
||||
where withDefaultInfo = pure . cofree . ((range .: categoryForJavaScriptProductionName name .: RNil) :<)
|
||||
|
Loading…
Reference in New Issue
Block a user