From 26e726c3092264584053a4f81714dcc8c91d2153 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Fri, 10 Mar 2017 17:17:23 -0800 Subject: [PATCH] spec: remove superfluous terms "delimiter" and "special tokens" The (original) section on "Operators and Delimiters" introduced superfluous terminology ("delimiter", "special token") which didn't matter and was used inconsistently. Removed any mention of "delimiter" or "special token" and now simply group the special character tokens into "operators" (clearly defined via links), and "punctuation" (everything else). Fixes #19450. Change-Id: Ife31b24b95167ace096f93ed180b7eae41c66808 Reviewed-on: https://go-review.googlesource.com/38073 Reviewed-by: Matthew Dempsky Reviewed-by: Rob Pike --- doc/go_spec.html | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/doc/go_spec.html b/doc/go_spec.html index 69e880090e8..fa95caca3a0 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -1,6 +1,6 @@ @@ -154,7 +154,7 @@ Any other comment acts like a newline.

Tokens form the vocabulary of the Go language. There are four classes: identifiers, keywords, operators -and delimiters, and literals. White space, formed from +and punctuation, and literals. White space, formed from spaces (U+0020), horizontal tabs (U+0009), carriage returns (U+000D), and newlines (U+000A), is ignored except as it separates tokens @@ -197,7 +197,7 @@ into the token stream immediately after a line's final token if that token is return -

  • one of the operators and delimiters +
  • one of the operators and punctuation ++, --, ), @@ -254,10 +254,11 @@ const fallthrough if range type continue for import return var -

    Operators and Delimiters

    +

    Operators and punctuation

    -The following character sequences represent operators, delimiters, and other special tokens: +The following character sequences represent operators +(including assignment operators) and punctuation:

     +    &     +=    &=     &&    ==    !=    (    )
    @@ -4494,8 +4495,8 @@ a[i] = 23
     
     

    An assignment operation x op= -y where op is a binary arithmetic operation is equivalent -to x = x op +y where op is a binary arithmetic operator +is equivalent to x = x op (y) but evaluates x only once. The op= construct is a single token. In assignment operations, both the left- and right-hand expression lists