diff options
author | Corey Lin <514971757@qq.com> | 2019-03-14 17:35:55 +0800 |
---|---|---|
committer | Martin Holst Swende <martin@swende.se> | 2019-03-14 17:35:55 +0800 |
commit | 768b4c2e6baa54527b76dc7cc03eae04f43f2a0c (patch) | |
tree | dd27fb7aa5afdc18a445e09f5365b8d833b24ea8 | |
parent | 1a29bf0ee2c5753a6a0f6f57a90d079b4d17702d (diff) | |
download | go-tangerine-768b4c2e6baa54527b76dc7cc03eae04f43f2a0c.tar go-tangerine-768b4c2e6baa54527b76dc7cc03eae04f43f2a0c.tar.gz go-tangerine-768b4c2e6baa54527b76dc7cc03eae04f43f2a0c.tar.bz2 go-tangerine-768b4c2e6baa54527b76dc7cc03eae04f43f2a0c.tar.lz go-tangerine-768b4c2e6baa54527b76dc7cc03eae04f43f2a0c.tar.xz go-tangerine-768b4c2e6baa54527b76dc7cc03eae04f43f2a0c.tar.zst go-tangerine-768b4c2e6baa54527b76dc7cc03eae04f43f2a0c.zip |
asm: remove unused parameter for function Lex (#18058)
-rw-r--r-- | cmd/evm/internal/compiler/compiler.go | 2 | ||||
-rw-r--r-- | core/asm/lex_test.go | 2 | ||||
-rw-r--r-- | core/asm/lexer.go | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/cmd/evm/internal/compiler/compiler.go b/cmd/evm/internal/compiler/compiler.go index 753ca6226..54981b669 100644 --- a/cmd/evm/internal/compiler/compiler.go +++ b/cmd/evm/internal/compiler/compiler.go @@ -25,7 +25,7 @@ import ( func Compile(fn string, src []byte, debug bool) (string, error) { compiler := asm.NewCompiler(debug) - compiler.Feed(asm.Lex(fn, src, debug)) + compiler.Feed(asm.Lex(src, debug)) bin, compileErrors := compiler.Compile() if len(compileErrors) > 0 { diff --git a/core/asm/lex_test.go b/core/asm/lex_test.go index e6901d4e3..16e0ad458 100644 --- a/core/asm/lex_test.go +++ b/core/asm/lex_test.go @@ -22,7 +22,7 @@ import ( ) func lexAll(src string) []token { - ch := Lex("test.asm", []byte(src), false) + ch := Lex([]byte(src), false) var tokens []token for i := range ch { diff --git a/core/asm/lexer.go b/core/asm/lexer.go index 91caeb27b..00526242e 100644 --- a/core/asm/lexer.go +++ b/core/asm/lexer.go @@ -95,7 +95,7 @@ type lexer struct { // lex lexes the program by name with the given source. It returns a // channel on which the tokens are delivered. -func Lex(name string, source []byte, debug bool) <-chan token { +func Lex(source []byte, debug bool) <-chan token { ch := make(chan token) l := &lexer{ input: string(source), |