Skip to content

Different types of string literals #15

@kiedtl

Description

@kiedtl
  • Non-NUL terminated strings.
  • Pascal strings.
  • UTF-16 strings (limited or no usefulness?)

Possible syntaxes:

  • (raw "lit") for non-nul-terminated, (pascal "lit") for pascal strings.
  • #r "lit", #p "lit".

I'd prefer the metadata one, because that's really what metadata is for, but it'll require the parser code to undergo some refactoring to be able to handle metadata preceding a value.

Usecase: Strings in mixed static data. See projects/astar.finw -- the MAP static is defined as [[U8 51] 30] due to the null terminators, when it's really only a [[U8 50] 30].

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang-newNew language feature proposal

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions