From 013dca5d7d83f3e6c42f0ec5aa274f2cd1fe4a0a Mon Sep 17 00:00:00 2001 From: Kazuki Sawada Date: Thu, 1 Aug 2019 22:57:50 +0900 Subject: [PATCH] case-insensitive-lexing: Golang: make direct-importing possible --- doc/resources/case_changing_stream.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/resources/case_changing_stream.go b/doc/resources/case_changing_stream.go index 2963acf89..5b510fa32 100644 --- a/doc/resources/case_changing_stream.go +++ b/doc/resources/case_changing_stream.go @@ -1,13 +1,15 @@ -package antlr +package antlr_resource import ( "unicode" + + "github.com/antlr/antlr4/runtime/Go/antlr" ) // CaseChangingStream wraps an existing CharStream, but upper cases, or // lower cases the input before it is tokenized. type CaseChangingStream struct { - CharStream + antlr.CharStream upper bool } @@ -15,10 +17,8 @@ type CaseChangingStream struct { // NewCaseChangingStream returns a new CaseChangingStream that forces // all tokens read from the underlying stream to be either upper case // or lower case based on the upper argument. -func NewCaseChangingStream(in CharStream, upper bool) *CaseChangingStream { - return &CaseChangingStream{ - in, upper, - } +func NewCaseChangingStream(in antlr.CharStream, upper bool) *CaseChangingStream { + return &CaseChangingStream{in, upper} } // LA gets the value of the symbol at offset from the current position