diff --git a/runtime/Go/src/antlr4/IntervalSet.go b/runtime/Go/src/antlr4/IntervalSet.go index 5177f8c45..d2353eaa5 100644 --- a/runtime/Go/src/antlr4/IntervalSet.go +++ b/runtime/Go/src/antlr4/IntervalSet.go @@ -23,7 +23,7 @@ func (i *Interval) contains(item int) { return item >= i.start && item < i.stop } -func (i *Interval) toString() { +func (i *Interval) toString() string { if(i.start==i.stop-1) { return strconv.Itoa(i.start) } else { diff --git a/runtime/Go/src/antlr4/PredictionContext.go b/runtime/Go/src/antlr4/PredictionContext.go index 0c0e9e7e6..d945c5ae5 100644 --- a/runtime/Go/src/antlr4/PredictionContext.go +++ b/runtime/Go/src/antlr4/PredictionContext.go @@ -156,7 +156,7 @@ func (this *SingletonPredictionContext) hashString() { return this.cachedHashString } -func (this *SingletonPredictionContext) toString() { +func (this *SingletonPredictionContext) toString() string { var up = this.parentCtx == nil ? "" : this.parentCtx.toString() if (up.length == 0) { if (this.returnState == this.EMPTY_RETURN_STATE) { @@ -193,7 +193,7 @@ func (this *EmptyPredictionContext) equals(other) { return this == other } -func (this *EmptyPredictionContext) toString() { +func (this *EmptyPredictionContext) toString() string { return "$" } @@ -247,7 +247,7 @@ func (this *ArrayPredictionContext) equals(other) { } } -func (this *ArrayPredictionContext) toString() { +func (this *ArrayPredictionContext) toString() string { if (this.isEmpty()) { return "[]" } else { diff --git a/runtime/Go/src/antlr4/Token.go b/runtime/Go/src/antlr4/Token.go index 94dd24a61..604e15e4a 100644 --- a/runtime/Go/src/antlr4/Token.go +++ b/runtime/Go/src/antlr4/Token.go @@ -141,7 +141,7 @@ Object.defineProperty(CommonToken.prototype, "text", { } }) -func (this *CommonToken) toString() { +func (this *CommonToken) toString() string { var txt = this.text if (txt != nil) { txt = txt.replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\t/g, "\\t") diff --git a/runtime/Go/src/antlr4/Utils.go b/runtime/Go/src/antlr4/Utils.go index 98af3b286..84def2695 100644 --- a/runtime/Go/src/antlr4/Utils.go +++ b/runtime/Go/src/antlr4/Utils.go @@ -80,7 +80,7 @@ func (this *Set) values() { return l } -func (this *Set) toString() { +func (this *Set) toString() string { return arrayToString(this.values()) } @@ -131,7 +131,7 @@ Object.defineProperty(BitSet.prototype, "length", { } }) -func (this *BitSet) toString() { +func (this *BitSet) toString() string { return "{" + this.values().join(", ") + "}" } diff --git a/runtime/Go/src/antlr4/atn/ATNConfig.go b/runtime/Go/src/antlr4/atn/ATNConfig.go index 96dd98f58..52edd3b5f 100644 --- a/runtime/Go/src/antlr4/atn/ATNConfig.go +++ b/runtime/Go/src/antlr4/atn/ATNConfig.go @@ -95,7 +95,7 @@ func (this *ATNConfig) hashString() { "/" + this.semanticContext.hashString() } -func (this *ATNConfig) toString() { +func (this *ATNConfig) toString() string { return "(" + this.state + "," + this.alt + (this.context!=nil ? ",[" + this.context.toString() + "]" : "") + (this.semanticContext != SemanticContext.NONE ? diff --git a/runtime/Go/src/antlr4/atn/ATNConfigSet.go b/runtime/Go/src/antlr4/atn/ATNConfigSet.go index 587cb99fb..322abe2a3 100644 --- a/runtime/Go/src/antlr4/atn/ATNConfigSet.go +++ b/runtime/Go/src/antlr4/atn/ATNConfigSet.go @@ -232,7 +232,7 @@ func (this *ATNConfigSet) setReadonly(readOnly) { } } -func (this *ATNConfigSet) toString() { +func (this *ATNConfigSet) toString() string { return Utils.arrayToString(this.configs) + (this.hasSemanticContext ? ",hasSemanticContext=" + this.hasSemanticContext : "") + (this.uniqueAlt != ATN.INVALID_ALT_NUMBER ? ",uniqueAlt=" + this.uniqueAlt : "") + diff --git a/runtime/Go/src/antlr4/atn/ATNState.go b/runtime/Go/src/antlr4/atn/ATNState.go index 5acd01f88..24bb66029 100644 --- a/runtime/Go/src/antlr4/atn/ATNState.go +++ b/runtime/Go/src/antlr4/atn/ATNState.go @@ -127,7 +127,7 @@ var ATNState.serializationNames = [ "PLUS_LOOP_BACK", "LOOP_END" ] -func (this *ATNState) toString() { +func (this *ATNState) toString() string { return this.stateNumber } diff --git a/runtime/Go/src/antlr4/atn/LexerAction.go b/runtime/Go/src/antlr4/atn/LexerAction.go index 6cf6d6282..c06c78021 100644 --- a/runtime/Go/src/antlr4/atn/LexerAction.go +++ b/runtime/Go/src/antlr4/atn/LexerAction.go @@ -50,7 +50,7 @@ func (this *LexerSkipAction) execute(lexer) { lexer.skip() } -func (this *LexerSkipAction) toString() { +func (this *LexerSkipAction) toString() string { return "skip" } @@ -84,7 +84,7 @@ func (this *LexerTypeAction) equals(other) { } } -func (this *LexerTypeAction) toString() { +func (this *LexerTypeAction) toString() string { return "type(" + this.type + ")" } @@ -119,7 +119,7 @@ func (this *LexerPushModeAction) equals(other) { } } -func (this *LexerPushModeAction) toString() { +func (this *LexerPushModeAction) toString() string { return "pushMode(" + this.mode + ")" } @@ -143,7 +143,7 @@ func (this *LexerPopModeAction) execute(lexer) { lexer.popMode() } -func (this *LexerPopModeAction) toString() { +func (this *LexerPopModeAction) toString() string { return "popMode" } @@ -166,7 +166,7 @@ func (this *LexerMoreAction) execute(lexer) { lexer.more() } -func (this *LexerMoreAction) toString() { +func (this *LexerMoreAction) toString() string { return "more" } @@ -202,7 +202,7 @@ func (this *LexerModeAction) equals(other) { } } -func (this *LexerModeAction) toString() { +func (this *LexerModeAction) toString() string { return "mode(" + this.mode + ")" } @@ -288,7 +288,7 @@ func (this *LexerChannelAction) equals(other) { } } -func (this *LexerChannelAction) toString() { +func (this *LexerChannelAction) toString() string { return "channel(" + this.channel + ")" } diff --git a/runtime/Go/src/antlr4/atn/SemanticContext.go b/runtime/Go/src/antlr4/atn/SemanticContext.go index 970ec9cab..c38cb0819 100644 --- a/runtime/Go/src/antlr4/atn/SemanticContext.go +++ b/runtime/Go/src/antlr4/atn/SemanticContext.go @@ -122,7 +122,7 @@ func (this *Predicate) equals(other) { } } -func (this *Predicate) toString() { +func (this *Predicate) toString() string { return "{" + this.ruleIndex + ":" + this.predIndex + "}?" } @@ -164,7 +164,7 @@ func (this *PrecedencePredicate) equals(other) { } } -func (this *PrecedencePredicate) toString() { +func (this *PrecedencePredicate) toString() string { return "{"+this.precedence+">=prec}?" } @@ -277,7 +277,7 @@ func (this *AND) evalPrecedence(parser, outerContext) { return result } -func (this *AND) toString() { +func (this *AND) toString() string { var s = "" this.opnds.map(function(o) { s += "&& " + o.toString() @@ -379,7 +379,7 @@ func (this *OR) evalPrecedence(parser, outerContext) { return result } -func (this *AND) toString() { +func (this *AND) toString() string { var s = "" this.opnds.map(function(o) { s += "|| " + o.toString() diff --git a/runtime/Go/src/antlr4/atn/Transition.go b/runtime/Go/src/antlr4/atn/Transition.go index c67fd8d91..f0b7bd69c 100644 --- a/runtime/Go/src/antlr4/atn/Transition.go +++ b/runtime/Go/src/antlr4/atn/Transition.go @@ -91,7 +91,7 @@ func (this *AtomTransition) matches( symbol, minVocabSymbol, maxVocabSymbol) { return this.label_ == symbol } -func (this *AtomTransition) toString() { +func (this *AtomTransition) toString() string { return this.label_ } @@ -128,7 +128,7 @@ func (this *EpsilonTransition) matches( symbol, minVocabSymbol, maxVocabSymbol) return false } -func (this *EpsilonTransition) toString() { +func (this *EpsilonTransition) toString() string { return "epsilon" } @@ -154,7 +154,7 @@ func (this *RangeTransition) matches(symbol, minVocabSymbol, maxVocabSymbol) { return symbol >= this.start && symbol <= this.stop } -func (this *RangeTransition) toString() { +func (this *RangeTransition) toString() string { return "'" + String.fromCharCode(this.start) + "'..'" + String.fromCharCode(this.stop) + "'" } @@ -187,7 +187,7 @@ func (this *PredicateTransition) getPredicate() { return NewPredicate(this.ruleIndex, this.predIndex, this.isCtxDependent) } -func (this *PredicateTransition) toString() { +func (this *PredicateTransition) toString() string { return "pred_" + this.ruleIndex + ":" + this.predIndex } @@ -209,7 +209,7 @@ func (this *ActionTransition) matches(symbol, minVocabSymbol, maxVocabSymbol) { return false } -func (this *ActionTransition) toString() { +func (this *ActionTransition) toString() string { return "action_" + this.ruleIndex + ":" + this.actionIndex } @@ -235,7 +235,7 @@ func (this *SetTransition) matches(symbol, minVocabSymbol, maxVocabSymbol) { } -func (this *SetTransition) toString() { +func (this *SetTransition) toString() string { return this.label.toString() } @@ -253,7 +253,7 @@ func (this *NotSetTransition) matches(symbol, minVocabSymbol, maxVocabSymbol) { !SetTransition.prototype.matches.call(this, symbol, minVocabSymbol, maxVocabSymbol) } -func (this *NotSetTransition) toString() { +func (this *NotSetTransition) toString() string { return '~' + SetTransition.prototype.toString.call(this) } @@ -271,7 +271,7 @@ func (this *WildcardTransition) matches(symbol, minVocabSymbol, maxVocabSymbol) return symbol >= minVocabSymbol && symbol <= maxVocabSymbol } -func (this *WildcardTransition) toString() { +func (this *WildcardTransition) toString() string { return "." } @@ -294,7 +294,7 @@ func (this *PrecedencePredicateTransition) getPredicate() { return NewPrecedencePredicate(this.precedence) } -func (this *PrecedencePredicateTransition) toString() { +func (this *PrecedencePredicateTransition) toString() string { return this.precedence + " >= _p" } diff --git a/runtime/Go/src/antlr4/dfa/DFASerializer.go b/runtime/Go/src/antlr4/dfa/DFASerializer.go index b55859ecd..a2761967a 100644 --- a/runtime/Go/src/antlr4/dfa/DFASerializer.go +++ b/runtime/Go/src/antlr4/dfa/DFASerializer.go @@ -10,7 +10,7 @@ func DFASerializer(dfa, literalNames, symbolicNames) { return this } -func (this *DFASerializer) toString() { +func (this *DFASerializer) toString() string { if(this.dfa.s0 == nil) { return nil } diff --git a/runtime/Go/src/antlr4/dfa/DFAState.go b/runtime/Go/src/antlr4/dfa/DFAState.go index 5cc0de78e..87f97f427 100644 --- a/runtime/Go/src/antlr4/dfa/DFAState.go +++ b/runtime/Go/src/antlr4/dfa/DFAState.go @@ -10,7 +10,7 @@ func PredPrediction(pred, alt) { return this } -func (this *PredPrediction) toString() { +func (this *PredPrediction) toString() string { return "(" + this.pred + ", " + this.alt + ")" } @@ -120,7 +120,7 @@ func (this *DFAState) equals(other) { } } -func (this *DFAState) toString() { +func (this *DFAState) toString() string { return "" + this.stateNumber + ":" + this.hashString() } diff --git a/runtime/Go/src/antlr4/error/Errors.go b/runtime/Go/src/antlr4/error/Errors.go index 11d5cd920..c76803014 100644 --- a/runtime/Go/src/antlr4/error/Errors.go +++ b/runtime/Go/src/antlr4/error/Errors.go @@ -58,7 +58,7 @@ func (this *RecognitionException) getExpectedTokens() { } } -func (this *RecognitionException) toString() { +func (this *RecognitionException) toString() string { return this.message } @@ -72,7 +72,7 @@ func LexerNoViableAltException(lexer, input, startIndex, deadEndConfigs) { //LexerNoViableAltException.prototype = Object.create(RecognitionException.prototype) //LexerNoViableAltException.prototype.constructor = LexerNoViableAltException -func (this *LexerNoViableAltException) toString() { +func (this *LexerNoViableAltException) toString() string { var symbol = "" if (this.startIndex >= 0 && this.startIndex < this.input.size) { symbol = this.input.getText((this.startIndex,this.startIndex)) diff --git a/runtime/Go/src/antlr4/tree/Tree.go b/runtime/Go/src/antlr4/tree/Tree.go index 3decec64f..96a8a08b0 100644 --- a/runtime/Go/src/antlr4/tree/Tree.go +++ b/runtime/Go/src/antlr4/tree/Tree.go @@ -165,7 +165,7 @@ func (this *TerminalNodeImpl) getText() { return this.symbol.text } -func (this *TerminalNodeImpl) toString() { +func (this *TerminalNodeImpl) toString() string { if (this.symbol.type == TokenEOF) { return "" } else {