@@ -31,7 +31,7 @@ Parses an iterator, allowing for the preceding keyword `outer`. Returns an
31
31
error expression if an invalid expression is parsed (anything other than
32
32
`=`, `in`, `∈`).
33
33
"""
34
- function parse_iterator (ps:: ParseState , outer = parse_outer (ps))
34
+ function parse_iterator (ps:: ParseState , outer= parse_outer (ps))
35
35
arg = @closer ps :range @closer ps :ws @nocloser ps :wsop parse_expression (ps)
36
36
if ! is_range (arg)
37
37
arg = mErrorToken (ps, arg, InvalidIterator)
@@ -135,7 +135,7 @@ function parse_call(ps::ParseState, ret::EXPR, ismacro=false)
135
135
end
136
136
# args = ismacro ? EXPR[ret, EXPR(:NOTHING, 0, 0)] : EXPR[ret]
137
137
trivia = EXPR[EXPR (next (ps))]
138
- @closeparen ps @default ps parse_comma_sep (ps, args, trivia, ! ismacro, insert_params_at = ismacro ? 3 : 2 )
138
+ @closeparen ps @default ps parse_comma_sep (ps, args, trivia, ! ismacro, insert_params_at= ismacro ? 3 : 2 )
139
139
accept_rparen (ps, trivia)
140
140
ret = EXPR (ismacro ? :macrocall : syntaxcall ? ret : :call , args, trivia)
141
141
end
146
146
Parses a comma separated list, optionally allowing for conversion of
147
147
assignment (`=`) expressions to `Kw`.
148
148
"""
149
- function parse_comma_sep (ps:: ParseState , args:: Vector{EXPR} , trivia:: Vector{EXPR} , kw = true , block = false , istuple = false ; insert_params_at = 2 )
149
+ function parse_comma_sep (ps:: ParseState , args:: Vector{EXPR} , trivia:: Vector{EXPR} , kw= true , block= false , istuple= false ; insert_params_at= 2 )
150
150
prevpos = position (ps)
151
151
@nocloser ps :inwhere @nocloser ps :newline @closer ps :comma while ! closer (ps)
152
152
a = parse_expression (ps)
@@ -205,11 +205,11 @@ end
205
205
206
206
Parses parameter arguments for a function call (e.g. following a semicolon).
207
207
"""
208
- function parse_parameters (ps:: ParseState , args:: Vector{EXPR} , args1:: Vector{EXPR} = EXPR[], insert_params_at = 2 ; usekw = true )
208
+ function parse_parameters (ps:: ParseState , args:: Vector{EXPR} , args1:: Vector{EXPR} = EXPR[], insert_params_at= 2 ; usekw= true )
209
209
trivia = EXPR[]
210
210
isfirst = isempty (args1)
211
211
prevpos = position (ps)
212
- @nocloser ps :inwhere @nocloser ps :newline @closer ps :comma while ! isfirst || (@nocloser ps :semicolon ! closer (ps))
212
+ @nocloser ps :inwhere @nocloser ps :newline @closer ps :comma while ! isfirst || (@nocloser ps :semicolon ! closer (ps))
213
213
a = isfirst ? parse_expression (ps) : first (args1)
214
214
if usekw && _do_kw_convert (ps, a)
215
215
a = _kw_convert (a)
347
347
function get_appropriate_child_to_expand (x)
348
348
if headof (x) === :generator && ! (headof (x. args[1 ]) in (:generator , :flatten ))
349
349
return x, x. args[1 ]
350
- elseif headof (x) === :flatten && headof (x. args[1 ]) === :generator && headof (x. args[1 ]. args[1 ]) === :generator
350
+ elseif headof (x) === :flatten && headof (x. args[1 ]) === :generator && headof (x. args[1 ]. args[1 ]) === :generator
351
351
x. args[1 ], x. args[1 ]. args[1 ]
352
352
else
353
353
get_appropriate_child_to_expand (x. args[1 ])
@@ -365,7 +365,7 @@ function parse_nonstd_identifier(ps)
365
365
end
366
366
end
367
367
368
- function parse_importexport_item (ps, is_colon = false )
368
+ function parse_importexport_item (ps, is_colon= false )
369
369
if kindof (ps. nt) === Tokens. AT_SIGN
370
370
parse_macroname (next (ps))
371
371
elseif kindof (ps. nt) === Tokens. LPAREN
@@ -377,7 +377,7 @@ function parse_importexport_item(ps, is_colon = false)
377
377
parse_unary (ps, INSTANCE (next (ps)))
378
378
elseif ! is_colon && isoperator (ps. nt)
379
379
next (ps)
380
- EXPR (:OPERATOR , ps. nt. startbyte - ps. t. startbyte, 1 + ps. t. endbyte - ps. t. startbyte, val (ps. t, ps))
380
+ EXPR (:OPERATOR , ps. nt. startbyte - ps. t. startbyte, 1 + ps. t. endbyte - ps. t. startbyte, val (ps. t, ps))
381
381
elseif is_nonstd_identifier (ps)
382
382
parse_nonstd_identifier (ps)
383
383
else
0 commit comments