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
constmacrosWithSetting: {signature?: stringargumentParser: ArgumentParser}={argumentParser: (nodes,startPos)=>{// parses things like `\lineskip=-\baselineskip`// nodes[startPos] is the equality signconstvalue=nodes[startPos+1]constargs=[value,// value or "-"
...(value.type==='string'&&value.content==='-'// actual value if value === '-'
? [nodes[startPos+2]]
: []),].map((n)=>arg(n))return{
args,nodesRemoved: args.length,}},}
But it doesn't to collect the arguments / remove them from the AST.
The text was updated successfully, but these errors were encountered:
In your function you should actually mutate the array by using .splice on nodes. That is why nodesRemoved is important, so that the caller knows how the array changed.
If you check in the linters, there should be some code that detects = followed by units that you could use.
How would I parse macros like this?
I have tried this:
But it doesn't to collect the arguments / remove them from the AST.
The text was updated successfully, but these errors were encountered: