Skip to content

Add Support for Escape Characters in Strings #2

@maybe-adev

Description

@maybe-adev

Extend the string logic in the lexer to allow escape sequences:

  • \n → newline

  • \t → tab

  • " → quote inside string

  • \ → backslash

Example:

show("Hello\nWorld")
show("He said \"Hi\" to me")

Tasks Needed:

  • Modify lexer to detect \ inside a string

  • Convert supported escape chars

  • Throw error if escape is invalid

Why this helps:
Makes Pearlen feel more like a real programming language and improves string readability.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions