Skip to content
Merged
Show file tree
Hide file tree
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
14 changes: 7 additions & 7 deletions editors/npp/TSSL.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<Keywords name="Numbers, suffix1"></Keywords>
<Keywords name="Numbers, suffix2"></Keywords>
<Keywords name="Numbers, range"></Keywords>
<Keywords name="Operators1">&gt; @</Keywords>
<Keywords name="Operators1">&lt; &gt; ;</Keywords>
<Keywords name="Operators2"></Keywords>
<Keywords name="Folders in code1, open"></Keywords>
<Keywords name="Folders in code1, middle"></Keywords>
Expand All @@ -24,15 +24,15 @@
<Keywords name="Folders in comment, open"></Keywords>
<Keywords name="Folders in comment, middle"></Keywords>
<Keywords name="Folders in comment, close"></Keywords>
<Keywords name="Keywords1">&quot;set value line&quot;&#x000D;&#x000A;&quot;set value join&quot;&#x000D;&#x000A;&quot;print&quot;&#x000D;&#x000A;&quot;print value&quot;&#x000D;&#x000A;&quot;print line&quot;&#x000D;&#x000A;&quot;print value line&quot;&#x000D;&#x000A;&quot;ask pause&quot;&#x000D;&#x000A;&quot;ask value line&quot;&#x000D;&#x000A;&quot;execute process&quot;&#x000D;&#x000A;&quot;execute process value&quot;&#x000D;&#x000A;&quot;execute process wait&quot;&#x000D;&#x000A;&quot;execute process value wait&quot;</Keywords>
<Keywords name="Keywords2">_language_version&#x000D;&#x000A;_interpreter_name&#x000D;&#x000A;_interpreter_website&#x000D;&#x000A;_interpreter_version</Keywords>
<Keywords name="Keywords3">&quot;jump&quot;&#x000D;&#x000A;&quot;jump if equals exact&quot;&#x000D;&#x000A;&quot;jump if equals expression&quot;</Keywords>
<Keywords name="Keywords1">&quot;set value&quot;&#x000D;&#x000A;&quot;print&quot;&#x000D;&#x000A;&quot;print line&quot;&#x000D;&#x000A;&quot;ask pause&quot;&#x000D;&#x000A;&quot;ask line&quot;&#x000D;&#x000A;&quot;execute&quot;&#x000D;&#x000A;&quot;execute wait&quot;</Keywords>
<Keywords name="Keywords2">_language_version&#x000D;&#x000A;_interpreter_name&#x000D;&#x000A;_interpreter_website&#x000D;&#x000A;_interpreter_version&#x000D;&#x000A;_last_execute_status</Keywords>
<Keywords name="Keywords3">&quot;?equals&quot;&#x000D;&#x000A;&quot;?not equals&quot;&#x000D;&#x000A;&quot;?matches&quot;&#x000D;&#x000A;&quot;?not matches&quot;</Keywords>
<Keywords name="Keywords4"></Keywords>
<Keywords name="Keywords5"></Keywords>
<Keywords name="Keywords6"></Keywords>
<Keywords name="Keywords7"></Keywords>
<Keywords name="Keywords8"></Keywords>
<Keywords name="Delimiters">00!TooSimpleScriptingLanguage 01 02((EOL)) 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords>
<Keywords name="Delimiters">00!TooSimpleScriptingLanguage 01 02((EOL)) 03@ 04 05((EOL)) 06\{ 07 08} 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords>
</KeywordLists>
<Styles>
<WordsStyle name="DEFAULT" fgColor="000000" bgColor="FFFFFF" colorStyle="0" fontStyle="0" nesting="0" />
Expand All @@ -52,8 +52,8 @@
<WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FFFFFF" colorStyle="0" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" colorStyle="0" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS1" fgColor="008080" bgColor="FFFFFF" colorStyle="1" fontStyle="1" nesting="0" />
<WordsStyle name="DELIMITERS2" fgColor="000000" bgColor="FFFFFF" colorStyle="0" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS3" fgColor="000000" bgColor="FFFFFF" colorStyle="0" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS2" fgColor="800080" bgColor="FFFFFF" colorStyle="1" fontStyle="1" nesting="0" />
<WordsStyle name="DELIMITERS3" fgColor="000000" bgColor="FFFFFF" colorStyle="0" fontStyle="4" nesting="2048" />
<WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" colorStyle="0" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" colorStyle="0" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" colorStyle="0" fontStyle="0" nesting="0" />
Expand Down
6 changes: 3 additions & 3 deletions examples/execute.toosimple
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
!TooSimpleScriptingLanguage 0.5
!TooSimpleScriptingLanguage 0.6

# https://tssl.yarb00.dev

print> What do you want to run today?:
ask value line> command
execute process value wait> command
ask line> command
execute wait> \{command}
18 changes: 7 additions & 11 deletions examples/hello.toosimple
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
!TooSimpleScriptingLanguage 0.5
!TooSimpleScriptingLanguage 0.6

# https://tssl.yarb00.dev

print line> Hello! What's your name?
print> Your name:
ask line> name

print> Name:
ask value line> name
print line> \{name}? Welcome!

print value> name
print line> ? Nice name!
print> Your age:
ask line> age

print> Your age?:
ask value line> age

print value> age
print line> ? ok :D
print line> \{age}? ok :D

print line> Press any key to exit.
ask pause>
26 changes: 16 additions & 10 deletions examples/jump.toosimple
Original file line number Diff line number Diff line change
@@ -1,27 +1,33 @@
!TooSimpleScriptingLanguage 0.5
!TooSimpleScriptingLanguage 0.6

# https://tssl.yarb00.dev

# jump> [label]
# <[label name]
# Continue code execution from a line with the specified label.

# jump if equals exact> [label];[value name];[value]
# If value called [value name] equals to [value], run "jump> [label]"; otherwise, do nothing.
# <[label name] ?equals> [text1];[text2]
# If [text1] is the same as [text2], run "<[label name]"; otherwise, do nothing.

# jump if equals expression> [label];[value name];[regex]
# If value called [value name] matches regex [regex], run "jump> [label]"; otherwise, do nothing.
# <[label name] ?matches> [text];[regex]
# If [text] matches [regex], run "<[label name]"; otherwise, do nothing.

# <[label name] ?not equals> [text1];[text2]
# If [text1] is different from [text2], run "<[label name]"; otherwise, do nothing.

# <[label name] ?not matches> [text];[regex]
# If [text] does NOT match [regex], run "<[label name]"; otherwise, do nothing.

@ask
print> Greet (y/n)?:
ask value line> answer
ask line> answer

# Print "Hi!" and exit.
jump if equals expression> continue;answer;^[yY]$
<continue ?matches> \{answer};^[yY]$
# Exit and don't print anything.
jump if equals expression> end;answer;^[nN]$
<end ?matches> \{answer};^[nN]$

# If answer is not 'y', 'Y', 'n' or 'N', ask again.
jump> ask
<ask

@continue
print line> Hi!
Expand Down
22 changes: 4 additions & 18 deletions examples/values.toosimple
Original file line number Diff line number Diff line change
@@ -1,23 +1,9 @@
!TooSimpleScriptingLanguage 0.5
!TooSimpleScriptingLanguage 0.6

# https://tssl.yarb00.dev

# This line MUST end with a space.
# Trimming of trailing spaces in *.toosimple files is disabled in .editorconfig,
# but if your editor doesn't respect it, turn off line trimming manually.
set value line> space;

# interpreter = _interpreter_name + ' ' + _interpreter_version
# Whitespace in the "set value join>" command is not required, but N++ syntax highlighting doesn't work without them.
set value join> interpreter ; _interpreter_name ; space ; _interpreter_version

print> TSSL version:
print value line> _language_version

print> Your interpreter:
print value line> interpreter

print> Website of your interpreter:
print value line> _interpreter_website
print line> TSSL version: \{_language_version}
print line> Your interpreter: \{_interpreter_name} v\{_interpreter_version}
print line> Website of your interpreter: \{_interpreter_website}

ask pause>