FredericDesgreniers / snow_automata

0 stars 0 forks source link

Add string literals #5

Closed FredericDesgreniers closed 6 years ago

FredericDesgreniers commented 6 years ago

Add string literals

"some word"

As a valid input for a state.

This would then be converted to a series of input and states for each character.

This means that tokens can be declared as

start {
    "return" => return RETURN
}

Instead of having to manually write the state chaining

FredericDesgreniers commented 6 years ago

Implemented. String literals are stored as char sequences, which are then transformed into a series of intermediate states.