@@ -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)
@@ -136,7 +136,7 @@ function parse_call(ps::ParseState, ret::EXPR, ismacro=false)
136
136
end
137
137
# args = ismacro ? EXPR[ret, EXPR(:NOTHING, 0, 0)] : EXPR[ret]
138
138
trivia = EXPR[EXPR (next (ps))]
139
- @closeparen ps @default ps parse_comma_sep (ps, args, trivia, ! ismacro, insert_params_at = ismacro ? 3 : 2 )
139
+ @closeparen ps @default ps parse_comma_sep (ps, args, trivia, ! ismacro, insert_params_at= ismacro ? 3 : 2 )
140
140
accept_rparen (ps, trivia)
141
141
ret = EXPR (ismacro ? :macrocall : syntaxcall ? ret : :call , args, trivia)
142
142
end
147
147
Parses a comma separated list, optionally allowing for conversion of
148
148
assignment (`=`) expressions to `Kw`.
149
149
"""
150
- function parse_comma_sep (ps:: ParseState , args:: Vector{EXPR} , trivia:: Vector{EXPR} , kw = true , block = false , istuple = false ; insert_params_at = 2 )
150
+ function parse_comma_sep (ps:: ParseState , args:: Vector{EXPR} , trivia:: Vector{EXPR} , kw= true , block= false , istuple= false ; insert_params_at= 2 )
151
151
prevpos = position (ps)
152
152
@nocloser ps :inwhere @nocloser ps :newline @closer ps :comma while ! closer (ps)
153
153
a = parse_expression (ps)
@@ -206,11 +206,11 @@ end
206
206
207
207
Parses parameter arguments for a function call (e.g. following a semicolon).
208
208
"""
209
- function parse_parameters (ps:: ParseState , args:: Vector{EXPR} , args1:: Vector{EXPR} = EXPR[], insert_params_at = 2 ; usekw = true )
209
+ function parse_parameters (ps:: ParseState , args:: Vector{EXPR} , args1:: Vector{EXPR} = EXPR[], insert_params_at= 2 ; usekw= true )
210
210
trivia = EXPR[]
211
211
isfirst = isempty (args1)
212
212
prevpos = position (ps)
213
- @nocloser ps :inwhere @nocloser ps :newline @closer ps :comma while ! isfirst || (@nocloser ps :semicolon ! closer (ps))
213
+ @nocloser ps :inwhere @nocloser ps :newline @closer ps :comma while ! isfirst || (@nocloser ps :semicolon ! closer (ps))
214
214
a = isfirst ? parse_expression (ps) : first (args1)
215
215
if usekw && _do_kw_convert (ps, a)
216
216
a = _kw_convert (a)
348
348
function get_appropriate_child_to_expand (x)
349
349
if headof (x) === :generator && ! (headof (x. args[1 ]) in (:generator , :flatten ))
350
350
return x, x. args[1 ]
351
- elseif headof (x) === :flatten && headof (x. args[1 ]) === :generator && headof (x. args[1 ]. args[1 ]) === :generator
351
+ elseif headof (x) === :flatten && headof (x. args[1 ]) === :generator && headof (x. args[1 ]. args[1 ]) === :generator
352
352
x. args[1 ], x. args[1 ]. args[1 ]
353
353
else
354
354
get_appropriate_child_to_expand (x. args[1 ])
@@ -366,7 +366,7 @@ function parse_nonstd_identifier(ps)
366
366
end
367
367
end
368
368
369
- function parse_importexport_item (ps, is_colon = false )
369
+ function parse_importexport_item (ps, is_colon= false )
370
370
if kindof (ps. nt) === Tokens. AT_SIGN
371
371
parse_macroname (next (ps))
372
372
elseif kindof (ps. nt) === Tokens. LPAREN
@@ -378,7 +378,7 @@ function parse_importexport_item(ps, is_colon = false)
378
378
parse_unary (ps, INSTANCE (next (ps)))
379
379
elseif ! is_colon && isoperator (ps. nt)
380
380
next (ps)
381
- EXPR (:OPERATOR , ps. nt. startbyte - ps. t. startbyte, 1 + ps. t. endbyte - ps. t. startbyte, val (ps. t, ps))
381
+ EXPR (:OPERATOR , ps. nt. startbyte - ps. t. startbyte, 1 + ps. t. endbyte - ps. t. startbyte, val (ps. t, ps))
382
382
elseif is_nonstd_identifier (ps)
383
383
parse_nonstd_identifier (ps)
384
384
else
0 commit comments