Skip to content

make saving raw source of literals optional #2

Description

@dherman

Make StringLiteral and NumberLiteral parameterized types to allow making it configurable whether to save the raw source. Probably something like

struct StringLiteral<T: Display, StringLiteralParser> {
    pub source: T,
    pub value: String
}

where StringLiteralParser is a custom trait that modularizes the parsing logic for string literals. This lets you construct a parser at compile time with the literal parsing logic you want.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions