mirror of https://github.com/golang/go.git
documentation edits:
add comments showing Go syntax for each token. move doc comments below hidden begin constants R=gri DELTA=66 (3 added, 3 deleted, 60 changed) OCL=34334 CL=34445
This commit is contained in:
parent
0421cf072e
commit
bd0c13e9f8
|
|
@ -24,77 +24,77 @@ const (
|
|||
EOF;
|
||||
COMMENT;
|
||||
|
||||
literal_beg;
|
||||
// Identifiers and basic type literals
|
||||
// (these tokens stand for classes of literals)
|
||||
literal_beg;
|
||||
IDENT;
|
||||
INT;
|
||||
FLOAT;
|
||||
CHAR;
|
||||
STRING;
|
||||
IDENT; // main
|
||||
INT; // 12345
|
||||
FLOAT; // 123.45
|
||||
CHAR; // 'a'
|
||||
STRING; // "abc"
|
||||
literal_end;
|
||||
|
||||
// Operators and delimiters
|
||||
operator_beg;
|
||||
ADD;
|
||||
SUB;
|
||||
MUL;
|
||||
QUO;
|
||||
REM;
|
||||
// Operators and delimiters
|
||||
ADD; // +
|
||||
SUB; // -
|
||||
MUL; // *
|
||||
QUO; // /
|
||||
REM; // %
|
||||
|
||||
AND;
|
||||
OR;
|
||||
XOR;
|
||||
SHL;
|
||||
SHR;
|
||||
AND_NOT;
|
||||
AND; // &
|
||||
OR; // |
|
||||
XOR; // ^
|
||||
SHL; // <<
|
||||
SHR; // >>
|
||||
AND_NOT; // &^
|
||||
|
||||
ADD_ASSIGN;
|
||||
SUB_ASSIGN;
|
||||
MUL_ASSIGN;
|
||||
QUO_ASSIGN;
|
||||
REM_ASSIGN;
|
||||
ADD_ASSIGN; // +=
|
||||
SUB_ASSIGN; // -=
|
||||
MUL_ASSIGN; // *=
|
||||
QUO_ASSIGN; // /=
|
||||
REM_ASSIGN; // %=
|
||||
|
||||
AND_ASSIGN;
|
||||
OR_ASSIGN;
|
||||
XOR_ASSIGN;
|
||||
SHL_ASSIGN;
|
||||
SHR_ASSIGN;
|
||||
AND_NOT_ASSIGN;
|
||||
AND_ASSIGN; // &=
|
||||
OR_ASSIGN; // |=
|
||||
XOR_ASSIGN; // ^=
|
||||
SHL_ASSIGN; // <<=
|
||||
SHR_ASSIGN; // >>=
|
||||
AND_NOT_ASSIGN; // &^=
|
||||
|
||||
LAND;
|
||||
LOR;
|
||||
ARROW;
|
||||
INC;
|
||||
DEC;
|
||||
LAND; // &&
|
||||
LOR; // ||
|
||||
ARROW; // <-
|
||||
INC; // ++
|
||||
DEC; // --
|
||||
|
||||
EQL;
|
||||
LSS;
|
||||
GTR;
|
||||
ASSIGN;
|
||||
NOT;
|
||||
EQL; // ==
|
||||
LSS; // <
|
||||
GTR; // >
|
||||
ASSIGN; // =
|
||||
NOT; // !
|
||||
|
||||
NEQ;
|
||||
LEQ;
|
||||
GEQ;
|
||||
DEFINE;
|
||||
ELLIPSIS;
|
||||
NEQ; // !=
|
||||
LEQ; // <=
|
||||
GEQ; // >=
|
||||
DEFINE; // :=
|
||||
ELLIPSIS; // ...
|
||||
|
||||
LPAREN;
|
||||
LBRACK;
|
||||
LBRACE;
|
||||
COMMA;
|
||||
PERIOD;
|
||||
LPAREN; // (
|
||||
LBRACK; // [
|
||||
LBRACE; // {
|
||||
COMMA; // ,
|
||||
PERIOD; // .
|
||||
|
||||
RPAREN;
|
||||
RBRACK;
|
||||
RBRACE;
|
||||
SEMICOLON;
|
||||
COLON;
|
||||
RPAREN; // )
|
||||
RBRACK; // ]
|
||||
RBRACE; // }
|
||||
SEMICOLON; // ;
|
||||
COLON; // :
|
||||
operator_end;
|
||||
|
||||
// Keywords
|
||||
keyword_beg;
|
||||
// Keywords
|
||||
BREAK;
|
||||
CASE;
|
||||
CHAN;
|
||||
|
|
|
|||
Loading…
Reference in New Issue