Skip to content
This repository was archived by the owner on Nov 11, 2021. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions editor/porth-micro.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENCE
# Version 2, December 2004
#
# Copyright (c) 2021 Leon Davis <[email protected]>
#
# Everyone is permitted to copy and distribute verbatim or modified
# copies of this license document, and changing it is allowed as long
# as the name is changed.

filetype: porth

detect:
filename: "\\.porth$"

rules:
- comment:
start: "//"
end: "$"
rules:
- todo: "(TODO|XXX|FIXME|NOTE):?"

- identifier: "\\b(?i)[a-z_]+"

- symbol.operator: "([-+/*=<>,]|[.]{2})"
- symbol.brackets: "(\\(|\\))"

- statement: "\\b(?i)(if|else|end|while|do|macro|include)"
- type.keyword: "\\b(?i)(macro|include)"

- constant.number: "\\b[0-9]+\\b"
- constant.string:
start: "\""
skip: "\\\\."
end: "\""
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "\'"
skip: "\\\\."
end: "\'"
rules:
- constant.specialChar: "\\\\."