Skip to content

Support *" string escape sequence #65

@associate-1

Description

@associate-1

Difficulty: Easy — Small addition to existing escape sequence handling in the lexer.

Summary

Occam uses *" inside string literals to represent a literal double-quote character. Currently the lexer does not handle this escape sequence, causing parse failures.

Occam syntax

VAL []BYTE msg IS "He said *"hello*"":

Proposed Go mapping

var msg []byte = []byte("He said \"hello\"")

Affected files

  • test_utils.occ (line 75)

Work required

  1. Lexer: In string literal scanning, recognize *" as an escape sequence that produces a " character (rather than terminating the string)

This is a small addition to the existing occam escape sequence handling (*n, *c, *t, etc.).

Part of #43.

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