Skip to content

Commit 768b4c2

Browse files
CoreyLinholiman
authored andcommitted
asm: remove unused parameter for function Lex (#18058)
1 parent 1a29bf0 commit 768b4c2

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎cmd/evm/internal/compiler/compiler.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525

2626
func Compile(fn string, src []byte, debug bool) (string, error) {
2727
compiler := asm.NewCompiler(debug)
28-
compiler.Feed(asm.Lex(fn, src, debug))
28+
compiler.Feed(asm.Lex(src, debug))
2929

3030
bin, compileErrors := compiler.Compile()
3131
if len(compileErrors) > 0 {

‎core/asm/lex_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
)
2323

2424
func lexAll(src string) []token {
25-
ch := Lex("test.asm", []byte(src), false)
25+
ch := Lex([]byte(src), false)
2626

2727
var tokens []token
2828
for i := range ch {

‎core/asm/lexer.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ type lexer struct {
9595

9696
// lex lexes the program by name with the given source. It returns a
9797
// channel on which the tokens are delivered.
98-
func Lex(name string, source []byte, debug bool) <-chan token {
98+
func Lex(source []byte, debug bool) <-chan token {
9999
ch := make(chan token)
100100
l := &lexer{
101101
input: string(source),

0 commit comments

Comments
 (0)