refactor lexer (#2)
Reduce manual usage of getPosition and setting it and improve some helper functions. Reviewed-on: #2 Reviewed-by: elland <igor@elland.me> Co-authored-by: Léana 江 <leana.jiang+git@icloud.com> Co-committed-by: Léana 江 <leana.jiang+git@icloud.com>
This commit is contained in:
parent
39cfe2035d
commit
6064afd0b9
3 changed files with 91 additions and 106 deletions
|
|
@ -12,7 +12,7 @@ bold ::= '__' text_no_newline '__'
|
|||
monospace ::= '@' text_content '@'
|
||||
|
||||
link ::= module_link | hyperlink | markdown_link
|
||||
module_link ::= '"' module_name ( '#' anchor_name )? '"'
|
||||
module_link ::= '"' module_name ( ('#' | '\#') anchor_name )? '"'
|
||||
hyperlink ::= '<' url ( ' ' link_text )? '>'
|
||||
markdown_link ::= '[' link_text '](' ( url | module_link ) ')'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue