1
1
mirror of https://github.com/github/semantic.git synced 2025-01-05 14:11:33 +03:00

Construct variable assignments.

This commit is contained in:
Rob Rix 2016-08-25 18:13:30 -04:00
parent f45cbbbcfa
commit 48fdd44d7c

View File

@ -145,6 +145,7 @@ javascriptTermConstructor source sourceSpan name range children = withDefaultInf
_ -> S.Indexed children
("ternary", (condition:cases)) -> S.Ternary condition cases
("arguments", _) -> S.Args children
("var_assignment", [ x, y ]) -> S.VarAssignment x y
(_, []) -> S.Leaf . toText $ slice range source
_ -> S.Indexed children
where withDefaultInfo = pure . cofree . ((range .: categoryForJavaScriptProductionName name .: RNil) :<)