Minor fixes for arrow like change patch

Don't use ^ operator yet for compatibility with older compilers.
Moved arrow like explanation, and fix precedence description on the text in the manual.
Fixed typo in news.
This commit is contained in:
ReneSac 2015-04-11 17:22:09 -03:00
commit 06617bbb76
3 changed files with 7 additions and 6 deletions

View file

@ -212,8 +212,8 @@ proc getPrecedence(tok: TToken, strongSpaces: bool): int =
let relevantChar = tok.ident.s[0]
# arrow like?
if L > 1 and tok.ident.s[^1] == '>' and tok.ident.s[^2] in {'-', '~', '='}:
return considerStrongSpaces(1)
if L > 1 and tok.ident.s[L-1] == '>' and
tok.ident.s[L-2] in {'-', '~', '='}: return considerStrongSpaces(1)
template considerAsgn(value: expr) =
result = if tok.ident.s[L-1] == '=': 1 else: value