Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: lexing



On 11/30/2015 08:23 AM, Bart Schaefer wrote:
On Nov 29,  8:47pm, Ray Andrews wrote:
}
}     $(( ##\e )) is 27,
}     (( #VAR ))
}     $(( #var ))
}
} ... but, given that there is preceding whitespace, would these three not
} break Bart's rule? Perhaps the whitespace here is does not qualify as
} 'word separating'?  Or is the " $(()) " construct an exception?

The whitespace is not "word separating" because (( stuff )) is shorthand
for
     let "stuff"
so the spaces are quoted, at the level at which comments apply.  $(( ))
is just a way to substitute inline the "let".

I thought of that construction as 'math'. But ... well nuts, so it is, and so is 'let' but with the implied quotation. So visually it's a gotcha, but not a very deep gotcha. So it's an exception but it should be simple enough to lex. Mysteries evaporate when one sees what's under the hood.



Messages sorted by: Reverse Date, Date, Thread, Author