Skip to content

Commit

Permalink
Merge pull request #298 from e6nlaq:e6nlaq/issue296
Browse files Browse the repository at this point in the history
Support for characters larger than 2 bytes
  • Loading branch information
e6nlaq authored Mar 6, 2023
2 parents 97ca3c5 + 5160495 commit 395a88c
Show file tree
Hide file tree
Showing 10 changed files with 543 additions and 3 deletions.
7 changes: 7 additions & 0 deletions aqua.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1592,6 +1592,9 @@ inline string aqua(string script, vector<string> line, int linenum)

return to_string(s.size());
}
else if (func == "?")
{
}
else
{
if (!op_funcskip && func != "" && func[0] >= '0')
Expand Down Expand Up @@ -1785,7 +1788,11 @@ int main(int argc, char const *argv[])

while (getline(file, read_file))
{
#ifdef WINDOWS
lines.push_back(utf8_to_ansi(read_file));
#else
lines.push_back(read_file);
#endif
}

// インシデント対応
Expand Down
Binary file modified aqua.obj
Binary file not shown.
Binary file modified bin/x64/aqua
Binary file not shown.
Binary file modified bin/x64/aqua.exe
Binary file not shown.
Binary file modified bin/x86/aqua
Binary file not shown.
5 changes: 4 additions & 1 deletion debug.aqua
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@

outf "ああ"
var string S
set S "マジ!?変数も!?(OWO)"

outf S
3 changes: 2 additions & 1 deletion lib/all.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@
#include "./script.h"
#include "./stdc++.h"
#include "./math.h"
#include "./type.h"
#include "./type.h"
// #include "./strconv.h"
2 changes: 1 addition & 1 deletion lib/script.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ inline vector<string> scriptcut(string line)

if (c != ' ')
{
if (c != '\t' && (c == '\n' || c >= ' '))
if (c != '\t' && (c == '\n' || c >= ' ' || c < 0))
result[i] += c;
if (c == '\"')
{
Expand Down
4 changes: 4 additions & 0 deletions lib/stdc++.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
// windows
#include <windows.h>
#include <conio.h>
#include "./strconv.h"

#define WINDOWS 1

#else
// linux
#endif
Loading

0 comments on commit 395a88c

Please sign in to comment.