Permalink
Browse files

TODOs added

  • Loading branch information...
1 parent dad244f commit 20fb530902b244500a833dca0b15950b04cab90c @arikon arikon committed Aug 30, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/ometa-highlighter.ometajs
@@ -41,18 +41,22 @@ ometa OmetaHighlighterJs {
| ``instanceof'' | ``void'' | ``this''):c -> [`keyword, c],
+ // TODO: unicode char, octal char
escapeChar = '\\':e char:c -> ['string.escape', [e, c]],
nonEscapeChar :q = ~seq(q) char,
quote :q = seq(q):c -> [`punctuation, c],
anyString :q :n = quote(q):qp
(escapeChar | nonEscapeChar(q))*:cs
quote(q) -> { cs.unshift(qp); cs.push(qp); [`string + '.' + n, cs] },
+ // TODO: modifiers (ff y or any)
+ // https://developer.mozilla.org/en/JavaScript/Guide/Regular_Expressions#Advanced_Searching_With_Flags
string = anyString('\'', `single)
| anyString('"', `double)
| (anyString('/', `regex):r (`g | `i | `m)*:f -> { r[1] = r[1].concat(f); r }),
+ // TODO: exponent
integer = digit+:c -> ['number.integer', c],
float = digit*:ws '.' digit*:fs ?(ws.length + fs.length != 0) -> ['number.float', ws.concat([[`punctuation, '.']]).concat(fs)],
hex = '0' 'x' (digit | `a | `b | `c | `d | `e | `f)*:c -> ['number.hex', ['0'].concat([[`punctuation, 'x']]).concat(c)],

0 comments on commit 20fb530

Please sign in to comment.