Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import "nre"
- type
- LexingRuleActionKind = enum
- intAction, floatAction, stringAction
- LexingRuleAction* = object
- case kind*: LexingRuleActionKind
- of intAction:
- callback: proc(match: string, env: int): tuple[ttype: string, value: int])
- of floatAction:
- callback: proc(match: string, env: int): tuple[ttype: string, value: float])
- of stringAction:
- callback: proc(match: string, env: int): tuple[ttype: string, value: string])
- LexingRule* = ref object of RootObj
- action*: LexingRuleAction
- pattern*: Regex
- flags*: seq[string]
- # Hint: system [Processing]
- # Hint: test [Processing]
- # Hint: nre [Processing]
- # Hint: pcre [Processing]
- # Hint: util [Processing]
- # Hint: tables [Processing]
- # Hint: hashes [Processing]
- # Hint: strutils [Processing]
- # Hint: parseutils [Processing]
- # Hint: etcpriv [Processing]
- # Hint: math [Processing]
- # Hint: times [Processing]
- # Hint: unsigned [Processing]
- # lib/impure/nre.nim(13, 8) Warning: unsigned is deprecated [Deprecated]
- # Hint: options [Processing]
- # Hint: typetraits [Processing]
- # Hint: unicode [Processing]
- # test.nim(8, 5) Error: not all cases are covered
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement