Skip to content

Instantly share code, notes, and snippets.

@almyu
Created February 9, 2017 13:02
Show Gist options
  • Save almyu/6518ed6da0d0785e4f4b3cd332cc3cc3 to your computer and use it in GitHub Desktop.
Save almyu/6518ed6da0d0785e4f4b3cd332cc3cc3 to your computer and use it in GitHub Desktop.
Panda BT syntax highlighting for Sublime Text 3
%YAML 1.2
---
name: Panda BT
file_extensions: [BT.txt, BT.lib.txt]
scope: source.panda
contexts:
main:
- match: \b(tree|sequence|fallback|parallel|race|random|repeat|while|not|mute)\b
scope: keyword.control.panda
- match: \b(\d+\.\d+|\.?\d+)\b
scope: constant.numeric.panda
- match: '"'
#scope: punctuation.definition.string.quoted.begin
push:
- meta_scope: string.quoted.double.panda
- match: \\.
scope: constant.character.escape.panda
- match: '"'
#scope: punctuation.definition.string.quoted.end
pop: true
- match: \(
push:
- match: \)
pop: true
- include: main
- match: \)
scope: invalid.illegal.stray-bracket-end
- match: //
push:
- meta_scope: comment.line.double-slash.panda
- match: $
pop: true
- match: \b[A-Za-z_][A-Za-z0-9_]*\b
scope: entity.name.function.panda
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment