-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Anumodh Narayanankutty
committed
Jun 13, 2016
1 parent
7a1d18d
commit 025acad
Showing
4 changed files
with
16 additions
and
98 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,30 @@ | ||
package regnet_lex_parse | ||
|
||
type tokenType int | ||
type TokenType int | ||
|
||
const ( | ||
IILEGAL tokenType = iota | ||
IILEGAL TokenType = iota | ||
KEY | ||
EQUALS | ||
PERCENT | ||
START_BRACE | ||
END_BRACE | ||
REG_TEXT | ||
WHITE_SPACE | ||
EOF | ||
SOME_TEXT_UNMARKED | ||
) | ||
|
||
const eof = rune(0) | ||
|
||
type Position int | ||
|
||
type Token struct { | ||
Type TokenType | ||
Pos Position | ||
Text string | ||
} | ||
|
||
func (t Token) String() string { | ||
return t.Text | ||
} |