Creating Sublime Text 3 syntax for obscure language

115 views Asked by At

There's a coding language called SugarCube designed for use in the Twine engine, which is used for text adventure games. Here's the Documentation for it. I'm not exactly an experienced coder - all I have is a few months in C# making a game in Unity - but I'd like to help a friend with his game, and hopefully writing his code in an editor instead of plaintext will help.

The only kind of code that matters is all marked with double angle brackets. Variables are marked with dollar signs $exampleVarand are declared and assigned using <<set $exampleVar = "foo">>.

If and switch statements use closing tags similar to HTML:

<<if $exampleVar == "foo">>
   // code 
<</if>> 

or

<<switch $exampleVar>>
<<case "foo">>
   // code
<</switch>>

The guides I've found for custom syntax (including official documentation) are either outdated or assume you already know everything about YAML, which I don't. Advice?

0

There are 0 answers