provided code
This commit is contained in:
16
src/main/wacc/lexer.scala
Normal file
16
src/main/wacc/lexer.scala
Normal file
@@ -0,0 +1,16 @@
|
||||
package wacc
|
||||
|
||||
import parsley.Parsley
|
||||
import parsley.token.Lexer
|
||||
import parsley.token.descriptions.*
|
||||
|
||||
object lexer {
|
||||
private val desc = LexicalDesc.plain.copy(
|
||||
// your configuration goes here
|
||||
)
|
||||
private val lexer = Lexer(desc)
|
||||
|
||||
val integer = lexer.lexeme.integer.decimal
|
||||
val implicits = lexer.lexeme.symbol.implicits
|
||||
def fully[A](p: Parsley[A]): Parsley[A] = lexer.fully(p)
|
||||
}
|
||||
Reference in New Issue
Block a user