Skip to content

Commit 5e5f06d

Browse files
committed
HTVM v2.2 is done
1 parent a235020 commit 5e5f06d

28 files changed

Lines changed: 2305 additions & 3268 deletions

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ HTVM-v1-DEPRECATED/*.exe
44
.vscode/*
55
EXTREME-HTVM-TESTING/
66
HTVM
7-
DOCUMENTATION_Generator
7+
DOCUMENTATION_Generator
8+
test

DOCUMENTATION.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@
275275
HTVM is a revolutionary tool designed to replace traditional programming. With HTVM, you can create your own programming language directly [here](https://themaster1127.github.io/HTVM/).
276276

277277

278-
HTVM offers **extensive syntax customization**, giving you the freedom to tailor the language structure to your own preferences. Almost all of these customizations can be converted into 15 languages, providing flexibility while keeping things simple.
278+
HTVM offers **extensive syntax customization**, giving you the freedom to tailor the language structure to your own preferences. Almost all of these customizations can be converted into 3 languages: JavaScript, Python, and C++. Providing flexibility while keeping things simple.
279279

280280
## Customization Features
281281

DOCUMENTATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Explore the wide range of built-in functions categorized for ease of use.
5959
HTVM is a revolutionary tool designed to replace traditional programming. With HTVM, you can create your own programming language directly [here](https://themaster1127.github.io/HTVM/).
6060

6161

62-
HTVM offers **extensive syntax customization**, giving you the freedom to tailor the language structure to your own preferences. Almost all of these customizations can be converted into 15 languages, providing flexibility while keeping things simple.
62+
HTVM offers **extensive syntax customization**, giving you the freedom to tailor the language structure to your own preferences. Almost all of these customizations can be converted into 3 languages: JavaScript, Python, and C++. Providing flexibility while keeping things simple.
6363

6464
## Customization Features
6565

DOCUMENTATION_Generator.cpp

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

DOCUMENTATION_Generator.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

HTVM.cpp

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10193,21 +10193,23 @@ std::string addSimpleStructs(std::string line) {
1019310193
}
1019410194
std::string line_fix_end = "";
1019510195
int line_fix_end_IS_IN = 0;
10196-
std::vector<std::string> items202 = LoopParseFunc(line, "\n", "\r");
10197-
for (size_t A_Index202 = 0; A_Index202 < items202.size(); A_Index202++) {
10198-
std::string A_LoopField202 = items202[A_Index202 - 0];
10199-
if (Trim(StrLower(A_LoopField202)) == "subout" || Trim(StrLower(A_LoopField202)) == keyWordEnd && line_fix_end_IS_IN == 1) {
10200-
line_fix_end += "subout" + Chr(10);
10201-
line_fix_end_IS_IN = 0;
10202-
}
10203-
else if (SubStr(Trim(A_LoopField202), 1, StrLen(keyWordStruct)) == keyWordStruct) {
10204-
line_fix_end_IS_IN = 1;
10205-
line_fix_end += A_LoopField202 + Chr(10);
10206-
} else {
10207-
line_fix_end += A_LoopField202 + Chr(10);
10196+
if (useEnd == "on") {
10197+
std::vector<std::string> items202 = LoopParseFunc(line, "\n", "\r");
10198+
for (size_t A_Index202 = 0; A_Index202 < items202.size(); A_Index202++) {
10199+
std::string A_LoopField202 = items202[A_Index202 - 0];
10200+
if (Trim(StrLower(A_LoopField202)) == "subout" || Trim(StrLower(A_LoopField202)) == keyWordEnd && line_fix_end_IS_IN == 1) {
10201+
line_fix_end += "subout" + Chr(10);
10202+
line_fix_end_IS_IN = 0;
10203+
}
10204+
else if (SubStr(Trim(A_LoopField202), 1, StrLen(keyWordStruct)) == keyWordStruct) {
10205+
line_fix_end_IS_IN = 1;
10206+
line_fix_end += A_LoopField202 + Chr(10);
10207+
} else {
10208+
line_fix_end += A_LoopField202 + Chr(10);
10209+
}
1020810210
}
10211+
line = StringTrimRight(line_fix_end, 1);
1020910212
}
10210-
line = StringTrimRight(line_fix_end, 1);
1021110213
std::vector<std::string> items203 = LoopParseFunc(line, "\n", "\r");
1021210214
for (size_t A_Index203 = 0; A_Index203 < items203.size(); A_Index203++) {
1021310215
std::string A_LoopField203 = items203[A_Index203 - 0];

HTVM.htvm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13117,6 +13117,9 @@ func str addSimpleStructs(str line) {
1311713117

1311813118
str line_fix_end := ""
1311913119
int line_fix_end_IS_IN := 0
13120+
13121+
if (useEnd = "on") {
13122+
1312013123
Loop, Parse, line, `n, `r {
1312113124

1312213125
if (Trim(StrLower(A_LoopField)) = "subout") or (Trim(StrLower(A_LoopField)) = keyWordEnd) and (line_fix_end_IS_IN = 1) {
@@ -13134,6 +13137,8 @@ line_fix_end .= A_LoopField . Chr(10)
1313413137
}
1313513138

1313613139
StringTrimRight, line, line_fix_end, 1
13140+
13141+
}
1313713142

1313813143
Loop, Parse, line, `n, `r {
1313913144
furtre.add(A_LoopField)

HTVM.js

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9753,21 +9753,23 @@ function addSimpleStructs(line) {
97539753
}
97549754
var line_fix_end = "";
97559755
var line_fix_end_IS_IN = 0;
9756-
let items202 = LoopParseFunc(line, "\n", "\r");
9757-
for (let A_Index202 = 0; A_Index202 < items202.length; A_Index202++) {
9758-
const A_LoopField202 = items202[A_Index202 - 0];
9759-
if (Trim(StrLower(A_LoopField202)) == "subout" || Trim(StrLower(A_LoopField202)) == keyWordEnd && line_fix_end_IS_IN == 1) {
9760-
line_fix_end += "subout" + Chr(10);
9761-
line_fix_end_IS_IN = 0;
9762-
}
9763-
else if (SubStr(Trim(A_LoopField202), 1, StrLen(keyWordStruct)) == keyWordStruct) {
9764-
line_fix_end_IS_IN = 1;
9765-
line_fix_end += A_LoopField202 + Chr(10);
9766-
} else {
9767-
line_fix_end += A_LoopField202 + Chr(10);
9756+
if (useEnd == "on") {
9757+
let items202 = LoopParseFunc(line, "\n", "\r");
9758+
for (let A_Index202 = 0; A_Index202 < items202.length; A_Index202++) {
9759+
const A_LoopField202 = items202[A_Index202 - 0];
9760+
if (Trim(StrLower(A_LoopField202)) == "subout" || Trim(StrLower(A_LoopField202)) == keyWordEnd && line_fix_end_IS_IN == 1) {
9761+
line_fix_end += "subout" + Chr(10);
9762+
line_fix_end_IS_IN = 0;
9763+
}
9764+
else if (SubStr(Trim(A_LoopField202), 1, StrLen(keyWordStruct)) == keyWordStruct) {
9765+
line_fix_end_IS_IN = 1;
9766+
line_fix_end += A_LoopField202 + Chr(10);
9767+
} else {
9768+
line_fix_end += A_LoopField202 + Chr(10);
9769+
}
97689770
}
9771+
line = StringTrimRight(line_fix_end, 1);
97699772
}
9770-
line = StringTrimRight(line_fix_end, 1);
97719773
let items203 = LoopParseFunc(line, "\n", "\r");
97729774
for (let A_Index203 = 0; A_Index203 < items203.length; A_Index203++) {
97739775
const A_LoopField203 = items203[A_Index203 - 0];

test

-58.9 KB
Binary file not shown.

testing/test.ahk

Lines changed: 0 additions & 116 deletions
This file was deleted.

0 commit comments

Comments
 (0)