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
Consider the Makefile docs $(call variable,param,param,…) should be legitimate, right?
If your Makefile looks like this:
# Makefiledefinelogger
echo $1
endefa:
$(call logger, '(string_param_with_parentheses)')$(call logger, '(spaces are OK)')$(call logger, "(double quotes are fine)")
Then running make will work fine:
$ make
echo'(string_param_with_parentheses)'
(string_param_with_parentheses)
echo'(spaces are OK)'
(spaces are OK)
echo"(double quotes are fine)"
(double quotes are fine)
However, parsing it will get you an error:
repro=b"""define logger echo $1endefa: $(call logger, '(string_param_with_parentheses)') $(call logger, '(spaces are OK)') $(call logger, "(double quotes are fine)")"""parsed=parser.parse(repro).walk().node.childrenprint(parsed[1].children[-1].children[0].children[0].children[0].children[2])
print(parsed[1].children[-1].children[1].children[0].children[0].children[2])
print(parsed[1].children[-1].children[2].children[0].children[0].children[2])
However, tree.root_node.children[0].children[2].children[0].children[0].children[0].children[-2].children[0].children should be a list containing three elements: f, ,, test
Consider the Makefile docs
$(call variable,param,param,…)
should be legitimate, right?If your
Makefile
looks like this:Then running
make
will work fine:However, parsing it will get you an error:
The printout indicates parsing errors:
The text was updated successfully, but these errors were encountered: