Skip to content

Some syntax ideasย #11

@gjvnq

Description

@gjvnq

Just some syntax ideas you may find useful.

Melody Regex Status
maybe a little of or lazily *? โ”
rematch ๐ท \๐ท โ”
rematch ๐‘›๐‘Ž๐‘š๐‘’ \k<๐‘›๐‘Ž๐‘š๐‘’> โ”
unicode class ... \p{...} โ”
unicode except clas ... \P{...} โ”
U+๐‘‹๐‘‹๐‘‹๐‘‹ \u๐‘‹๐‘‹๐‘‹๐‘‹ โ”
X+๐‘‹๐‘‹ \x๐‘‹๐‘‹ โ”
o๐ท๐ท๐ท (e.g. o700) \๐ท๐ท๐ท โ”
^๐‘Œ \c๐‘Œ โ”
word boundary \b โ”
word non boundary \B โ”
rematch 1 $1 โ”
insert { until match } $` โ”
insert { full match } $& โ”
Could not find this notation anywhere. Typo? x20 โ”
Could not find this notation anywhere. Typo? x{06fa} โ”

Also, allow multiple regexps per file and let them refer to previous ones, e.g.:

regexp iso-date {
  4 of digit;
  "-";
  2 of digit;
  "-";
  2 of digit;
}

regexp iso-range {
  match iso-date;
  "/";
  match iso-date;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    compilerRelated to the Melody compilerenhancementNew feature or requestsyntaxConcerning the Melody language syntax

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      โšก