zf

zenflows testing
git clone https://s.sonu.ch/~srfsh/zf.git
Log | Files | Refs | Submodules | README | LICENSE

atoms.ex.exs (1055B)


      1 defmodule Makeup.Lexers.ElixirLexer.Atoms do
      2   @moduledoc false
      3 
      4   # parsec:Makeup.Lexers.ElixirLexer.Atoms
      5   # This module is generated at "dev time" so that the lexer
      6   # doesn't have to depend on the (excellent) `unicode_set` library,
      7   # which takes several minutes to compile.
      8   import NimbleParsec
      9 
     10   atom_start_unicode_syntax =
     11     "[[:L:][:Nl:][:Other_ID_Start:]-[:Pattern_Syntax:]-[:Pattern_White_Space:][_]]"
     12 
     13   atom_continue_unicode_syntax =
     14     "[[:ID_Start:][:Mn:][:Mc:][:Nd:][:Pc:][:Other_ID_Continue:]-[:Pattern_Syntax:]-[:Pattern_White_Space:][_@]]"
     15 
     16   # TODO: Why do we need to flatten these lists? A bug in `unicode_set`?
     17   atom_start_chars = Unicode.Set.to_utf8_char(atom_start_unicode_syntax) |> List.flatten()
     18   atom_continue_chars = Unicode.Set.to_utf8_char(atom_continue_unicode_syntax) |> List.flatten()
     19 
     20   defcombinator(:atom_start_chars, label(utf8_char(atom_start_chars), "atom start"))
     21   defcombinator(:atom_continue_chars, label(utf8_char(atom_continue_chars), "atom continue"))
     22   # parsec:Makeup.Lexers.ElixirLexer.Atoms
     23 end