Skip to content

Commit

Permalink
reformat some files
Browse files Browse the repository at this point in the history
  • Loading branch information
FPtje committed Jul 1, 2024
1 parent 122c769 commit 85dc32a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/GLua/Lexer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ parseKeyword tok str =
(\s -> Identifier (str ++ s)) <$> many1 pIdentifierCharacter
<|> return tok
<?> "Keyword "
++ str
++ str
)

-- | Parse just an identifier.
Expand Down
28 changes: 14 additions & 14 deletions src/GLua/Parser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -368,19 +368,19 @@ parseSubExpression =
ANil
<$ pMTok Nil
<|> AFalse
<$ pMTok TFalse
<$ pMTok TFalse
<|> ATrue
<$ pMTok TTrue
<$ pMTok TTrue
<|> parseNumber
<|> AString
<$> parseString
<$> parseString
<|> AVarArg
<$ pMTok VarArg
<$ pMTok VarArg
<|> parseAnonymFunc
<|> APrefixExpr
<$> parsePrefixExp
<$> parsePrefixExp
<|> ATableConstructor
<$> parseTableConstructor
<$> parseTableConstructor
<?> "expression"

-- | Separate parser for anonymous function subexpression
Expand Down Expand Up @@ -487,9 +487,9 @@ pPFExprCallSuffix =
Call
<$> parseArgs
<|> MetaCall
<$ pMTok Colon
<*> pName
<*> parseArgs
<$ pMTok Colon
<*> pName
<*> parseArgs
<?> "function call"

-- | Parse an indexing expression suffix
Expand All @@ -500,8 +500,8 @@ pPFExprIndexSuffix =
<*> parseExpression
<* pMTok RSquare
<|> DotIndex
<$ pMTok Dot
<*> pName
<$ pMTok Dot
<*> pName
<?> "indexation"

-- | Function calls are prefix expressions, but the last suffix MUST be either a function call or a metafunction call
Expand Down Expand Up @@ -543,9 +543,9 @@ parseArgs =
<*> option [] parseExpressionList
<* pMTok RRound
<|> TableArg
<$> parseTableConstructor
<$> parseTableConstructor
<|> StringArg
<$> parseString
<$> parseString
<?> "function arguments"

-- | Table constructor
Expand Down Expand Up @@ -584,7 +584,7 @@ parseField =
<*> parseExpression
<|> parseNamedField
<|> UnnamedField
<$> parseExpression
<$> parseExpression
<?> "field"

-- | Field separator, either comma or semicolon
Expand Down

0 comments on commit 85dc32a

Please sign in to comment.