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.
Extend the string logic in the lexer to allow escape sequences:
\n → newline
\t → tab
" → quote inside string
\ → backslash
Example:
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.