aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-09-08 12:27:09 -0700
committerRuss Cox <rsc@golang.org>2009-09-08 12:27:09 -0700
commitbd0c13e9f8ebe9ecab9cd7fca10342ee584fd3ed (patch)
tree7185dda8bf6921c89be928e29f6f67948d28cd49 /src
parent0421cf072e275534a21790630081ff498e682016 (diff)
downloadgo-bd0c13e9f8ebe9ecab9cd7fca10342ee584fd3ed.tar.xz
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
Diffstat (limited to 'src')
-rw-r--r--src/pkg/go/token/token.go110
1 files changed, 55 insertions, 55 deletions
diff --git a/src/pkg/go/token/token.go b/src/pkg/go/token/token.go
index 32958b53f0..e0ee0decf9 100644
--- a/src/pkg/go/token/token.go
+++ b/src/pkg/go/token/token.go
@@ -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;