Rename Lexer.mode to setMode

Also minor formatting.
This commit is contained in:
Will Faught 2016-05-26 23:27:21 -07:00
parent 128ec07dd3
commit 10eb1a1970
2 changed files with 7 additions and 3 deletions

View File

@ -19,7 +19,7 @@ type Lexer interface {
pushMode(int)
popMode() int
setType(int)
mode(int)
setMode(int)
}
type BaseLexer struct {
@ -249,6 +249,10 @@ func (b *BaseLexer) More() {
b.thetype = LexerMore
}
func (b *BaseLexer) setMode(m int) {
b.mode = m
}
func (b *BaseLexer) pushMode(m int) {
if LexerATNSimulatorDebug {
fmt.Println("pushMode " + strconv.Itoa(m))

View File

@ -232,7 +232,7 @@ func NewLexerModeAction(mode int) *LexerModeAction {
// <p>This action is implemented by calling {@link Lexer//mode} with the
// value provided by {@link //getMode}.</p>
func (l *LexerModeAction) execute(lexer Lexer) {
lexer.mode(l.mode)
lexer.setMode(l.mode)
}
func (l *LexerModeAction) Hash() string {