Created
August 12, 2025 10:10
-
-
Save sogaiu/617352a0623e827b2b3df579246e2c4b to your computer and use it in GitHub Desktop.
janet support in rouge notes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hex string escapes missing | |
missing upscope | |
@specials ||= Set.new %w( | |
break def do fn if quote quasiquote splice set unquote var while | |
) | |
hex handling missing things like 0x2. | |
rule %r/[+-]?0x\h[\h_]*(\.\h[\h_]*)?/, Num::Hex | |
rule %r/[+-]?0x\.\h[\h_]*/, Num::Hex | |
similar issue for decimals like 7. | |
rule %r/[+-]?\d[\d_]*(\.\d[\d_]*)?([e][+-]?\d+)?/i, Num::Float | |
rule %r/[+-]?\.\d[\d_]*([e][+-]?\d+)?/i, Num::Float | |
contains ~ | |
punctuation = %r/[_!$%^&*+=~<>.?\/-]/o | |
symbol = %r/([[:alpha:]]|#{punctuation})([[:word:]]|#{punctuation}|:)*/o | |
allows `` as long-string? | |
rule %r/@?(`+).*?\1/m, Str::Heredoc | |
contains #? | |
rule %r/[\#~,';\|]/, Operator | |
lib/rouge/demos/janet - very sparse...fill in more? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment