Skip to content

Commit

Permalink
some smaller fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
theredcmdcraft committed Dec 4, 2024
1 parent ccd3522 commit eb82d73
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions runtime/syntax/nftables.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
filetype: nftables

detect:
filename: "(nftables\\.(conf|rules)$|nftables(\\.rules)?\\.d/)"
header: "^(#!.*/(env +)?nft( |$)|flush +ruleset)"
filename: "(nftables\\.(conf|rules)$|nftables(\\.rules)?\\.d/)"
header: "^(#!.*/(env +)?nft( |$)|flush +ruleset)"

rules:
- type: "\\b(chain|counter|map|rule|ruleset|set|table)\\b"
- type: "\\b(ether|inet|i(cm)?p(x|(v?(4|6))?)|tcp|udp)\\b"
- type: "\\b(ether|inet|i(cm)?p(x|(v?(4|6))?)|tcp|udp|8021q)\\b"
- special: "\\b(elements|hook|policy|priority|type|state)\\b"
- identifier: "\\b(ct|iif|iifname|meta|oif|oifname|th|dport|sport|saddr|daddr|l4proto)\\b"
- statement: "\\b(accept|drop|goto|jump|log|masquerade|reject|limit|queue)\\b"
- preproc: "\\b(add|define|flush|include|delete)\\b"
- symbol.operator: "[<>.&|^!=:;,@]|\\b(and|ge|gt|le|lt|or|xor)\\b"
- constant.string: '([\+\-\*/][\"]{1})(.*)([\"]{1})'
- constant.string:
start: "\""
end: "\""
start: "\""
end: "\""
# Integer Constants
- constant.number: "([-+]?[1-9]\\d*)"
- constant.number: "\\b((0x)?[0-9a-fA-F.]+)\\b"
- identifier.var: "[$@][a-zA-Z_.][a-zA-Z0-9_/.-]*"
- comment: "(^|[[:space:]])#([^{].*)?$"
- indent-char.whitespace: "[[:space:]]+$"
Expand Down

0 comments on commit eb82d73

Please sign in to comment.