You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 1, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: src/Language/Python/Assignment.hs
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -253,7 +253,7 @@ forStatement = symbol ForStatement >>= \ loc -> children (make loc <$> (symbol V
253
253
Just a -> makeTerm loc (Statement.Else (makeTerm loc $Statement.ForEach binding subject body) a)
254
254
255
255
whileStatement::AssignmentTerm
256
-
whileStatement = symbol WhileStatement>>=\ loc -> children (make loc <$> term expression <*>block<*> optional (symbol ElseClause*> children expressions))
256
+
whileStatement = symbol WhileStatement>>=\ loc -> children (make loc <$> term expression <*>expressions<*> optional (symbol ElseClause*> children expressions))
257
257
where
258
258
make loc whileCondition whileBody whileElseClause =case whileElseClause of
259
259
Nothing-> makeTerm loc (Statement.While whileCondition whileBody)
makeFunctionDeclaration <$> symbol FunctionDefinition<*> children ((,,,) <$> term expression <* symbol Parameters<*> children (manyTerm functionParam) <*> optional (symbol Type*> children (term expression)) <*>block)
283
-
<|> makeFunctionDeclaration <$> (symbol Lambda'<|> symbol Lambda) <*> children ((,,,) <$ token AnonLambda<*> emptyTerm <*> (symbol LambdaParameters*> children (manyTerm expression) <|>pure[]) <*> optional (symbol Type*> children (term expression)) <*>block)
282
+
makeFunctionDeclaration <$> symbol FunctionDefinition<*> children ((,,,) <$> term expression <* symbol Parameters<*> children (manyTerm functionParam) <*> optional (symbol Type*> children (term expression)) <*>expressions)
283
+
<|> makeFunctionDeclaration <$> (symbol Lambda'<|> symbol Lambda) <*> children ((,,,) <$ token AnonLambda<*> emptyTerm <*> (symbol LambdaParameters*> children (manyTerm expression) <|>pure[]) <*> optional (symbol Type*> children (term expression)) <*>expressions)
284
284
where
285
285
makeFunctionDeclaration loc (functionName', functionParameters, ty, functionBody)
286
286
=let fn = makeTerm loc (Declaration.Function[] functionName' functionParameters functionBody)
0 commit comments