mirror of
https://github.com/github/semantic.git
synced 2025-01-04 21:47:07 +03:00
Rename arguments
This commit is contained in:
parent
19dcdc3fd9
commit
b1a7dba4ec
@ -155,9 +155,9 @@ expression = await
|
||||
forStatement :: Assignment
|
||||
forStatement = symbol ForStatement >>= \ loc -> children (make loc <$> (makeTerm <$> symbol Variables <*> children (many expression)) <*> expressionList <*> (makeTerm <$> location <*> many expression) <*> (optional (makeTerm <$> symbol ElseClause <*> children (many declaration))))
|
||||
where
|
||||
make loc variables expressionList expressions elseClause = case elseClause of
|
||||
Nothing -> makeTerm loc $ (Statement.ForEach variables expressionList expressions)
|
||||
Just a -> makeTerm loc $ (Statement.Else (makeTerm loc $ Statement.ForEach variables expressionList expressions) a)
|
||||
make loc variables expressionList forBody forElseClause = case forElseClause of
|
||||
Nothing -> makeTerm loc $ (Statement.ForEach variables expressionList forBody)
|
||||
Just a -> makeTerm loc $ (Statement.Else (makeTerm loc $ Statement.ForEach variables expressionList forBody) a)
|
||||
|
||||
whileStatement :: Assignment
|
||||
whileStatement = symbol WhileStatement >>= \ loc -> children (make loc <$> expression <*> (makeTerm <$> location <*> many expression) <*> (optional (makeTerm <$> symbol ElseClause <*> children (many declaration))))
|
||||
|
Loading…
Reference in New Issue
Block a user