Skip to content

Commit 399054d

Browse files
Merge pull request #17 from JunLang-dev/development
v1.14.5
2 parents 74a580d + 640c703 commit 399054d

File tree

5 files changed

+38
-3
lines changed

5 files changed

+38
-3
lines changed

JunLang.sublime-syntax

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
%YAML 1.2
2+
---
3+
name: JunLang
4+
scope: source.junlang
5+
6+
file_extensions:
7+
- jun
8+
9+
contexts:
10+
main:
11+
- match: '\b(output|wrap|new|set|input|addition|subtraction|multiplication|division|equal|greater|less|equal_or_greater|equal_or_less|not|if|end-if|loop|end-loop)\b'
12+
scope: keyword.control
13+
- match: 'note'
14+
push: note
15+
- match: '"'
16+
push: string
17+
string:
18+
- meta_scope: string.quoted.double
19+
- match: '"'
20+
scope: string.quoted.double
21+
pop: true
22+
- match: \\.
23+
scope: constant.character.escape
24+
note:
25+
- meta_scope: comment.line
26+
- match: '\n'
27+
pop: true

src/identifiers/identifiers.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@
1616
#include "if.hpp"
1717
#include "end_if.hpp"
1818
#include "loop.hpp"
19-
#include "end_loop.hpp"
19+
#include "end_loop.hpp"
20+
#include "note.hpp"

src/identifiers/note.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
void note(vector<string>::iterator it) {
2+
return;
3+
}

src/init.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <climits>
1111
using namespace std;
1212
#pragma GCC std("c++11")
13-
const string _VERSION_ = "v1.14.4";
13+
const string _VERSION_ = "v1.14.5";
1414
const int _BUFFER_SIZE_ = 1024;
1515
const string identifiers[] = {
1616
"output",
@@ -31,7 +31,8 @@ const string identifiers[] = {
3131
"if",
3232
"end-if",
3333
"loop",
34-
"end-loop"
34+
"end-loop",
35+
"note"
3536
};
3637
struct Variable {
3738
long double value;

src/interpreter.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ void interpreter(vector<string> vec, ifstream &file) {
7575
else if (*it == identifiers[18]) {
7676
end_loop(it, file);
7777
}
78+
else if (*it == identifiers[19]) {
79+
note(it);
80+
}
7881
break;
7982
}
8083
else {

0 commit comments

Comments
 (0)