Last active
October 6, 2020 17:53
-
-
Save redexp/ecf7447b96e148f804c4a0dab9721755 to your computer and use it in GitHub Desktop.
Pseudo code2flow syntax highlight for sublime
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%YAML 1.2 | |
--- | |
name: Pseudo code2flow | |
file_extensions: [pc2f] | |
scope: source.pc | |
contexts: | |
main: | |
- match: '^\s*(if|else|for|while)\b' | |
scope: keyword.control.pc | |
push: if_string | |
- match: '\b(else|for)\b' | |
scope: keyword.control.pc | |
- match: '//' | |
scope: punctuation.definition.comment.pc | |
push: line_comment | |
- match: '\w' | |
push: description | |
if_string: | |
- match: '\(' | |
meta_scope: meta.brackets.pc | |
scope: punctuation.section.brackets.begin.pc | |
- match: '\)' | |
meta_scope: meta.brackets.pc | |
- match: '\{' | |
pop: true | |
- match: '\n' | |
pop: true | |
- match: '[^\(\)]' | |
scope: string.quoted.double.pc | |
line_comment: | |
- meta_scope: comment.line.pc | |
- match: $ | |
pop: true | |
description: | |
- meta_scope: text.pc | |
- match: '\*\w' | |
push: bold | |
- match: '_\w' | |
push: italic | |
- match: '`' | |
push: code | |
- match: '\[[^\]]+\]\([^\)]+' | |
push: link | |
- match: 'https?://[^\s\;]+' | |
push: http | |
- match: ';' | |
pop: true | |
bold: | |
- meta_scope: markup.bold | |
- match: '\*' | |
pop: true | |
italic: | |
- meta_scope: markup.italic | |
- match: '_' | |
pop: true | |
code: | |
- meta_scope: markup.quote | |
- match: '`' | |
pop: true | |
link: | |
- meta_scope: markup.underline.link | |
- match: '\)' | |
pop: true | |
http: | |
- meta_scope: markup.underline.link | |
- match: '(\s|\;|$)' | |
pop: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment