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:
parent
34997292f4
commit
06617bbb76
3 changed files with 7 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue