Skip to content

Skipping whitespace tokensΒ #156

@jarble

Description

@jarble

Is it possible to skip tokens when defining a lexer?
I want to split a string into a list of tokens without whitespace, but I don't know if Moo can do this:

Input string:

  • "while ( a < 3 ) { a += 1; }"

List of tokens:

  • ["while","(","a","<","3",")","{","a","+=","1",",";","}"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions