Compare commits
9 Commits
820fc7a82e
...
f301a663f3
Author | SHA1 | Date |
---|---|---|
0x4261756D | f301a663f3 | |
0x4261756D | 5b3da8b4b7 | |
0x4261756D | f1f658169e | |
0x4261756D | 23199d37f3 | |
0x4261756D | 5de6233436 | |
0x4261756D | e89625c2e9 | |
0x4261756D | 501bc9eed6 | |
0x4261756D | a4d9e5023f | |
0x4261756D | f310882220 |
|
@ -11,7 +11,7 @@
|
||||||
"preLaunchTask": "build",
|
"preLaunchTask": "build",
|
||||||
// If you have changed target frameworks, make sure to update the program path.
|
// If you have changed target frameworks, make sure to update the program path.
|
||||||
"program": "${workspaceFolder}/bin/Debug/net8.0/luaaaaah.dll",
|
"program": "${workspaceFolder}/bin/Debug/net8.0/luaaaaah.dll",
|
||||||
"args": ["test/simpleString.lua"],
|
"args": ["run", "test/stringDataNotSet.lua"],
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
|
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
|
||||||
"console": "internalConsole",
|
"console": "internalConsole",
|
||||||
|
@ -23,4 +23,4 @@
|
||||||
"request": "attach"
|
"request": "attach"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
15
Tokenizer.cs
15
Tokenizer.cs
|
@ -265,14 +265,12 @@ class Tokenizer
|
||||||
break;
|
break;
|
||||||
case '"':
|
case '"':
|
||||||
{
|
{
|
||||||
currentToken = null;
|
|
||||||
state = State.Quote;
|
state = State.Quote;
|
||||||
currentToken = new(region: new(start: new(currentLocation), end: new(currentLocation)), type: TokenType.StringLiteral);
|
currentToken = new(region: new(start: new(currentLocation), end: new(currentLocation)), type: TokenType.StringLiteral);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case '\'':
|
case '\'':
|
||||||
{
|
{
|
||||||
currentToken = null;
|
|
||||||
state = State.SingleQuote;
|
state = State.SingleQuote;
|
||||||
currentToken = new(region: new(start: new(currentLocation), end: new(currentLocation)), type: TokenType.StringLiteral);
|
currentToken = new(region: new(start: new(currentLocation), end: new(currentLocation)), type: TokenType.StringLiteral);
|
||||||
}
|
}
|
||||||
|
@ -319,6 +317,7 @@ class Tokenizer
|
||||||
{
|
{
|
||||||
currentToken.type = TokenType.StringLiteral;
|
currentToken.type = TokenType.StringLiteral;
|
||||||
currentToken.region.end = new(currentLocation);
|
currentToken.region.end = new(currentLocation);
|
||||||
|
currentToken.data ??= new Token.StringData("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -400,7 +399,7 @@ class Tokenizer
|
||||||
case 'x':
|
case 'x':
|
||||||
{
|
{
|
||||||
state = State.QuoteBackslashX;
|
state = State.QuoteBackslashX;
|
||||||
throw new NotImplementedException($"\\u escape sequences are broken right now");
|
throw new NotImplementedException($"\\x escape sequences are broken right now");
|
||||||
}
|
}
|
||||||
case 'u':
|
case 'u':
|
||||||
{
|
{
|
||||||
|
@ -515,7 +514,7 @@ class Tokenizer
|
||||||
{
|
{
|
||||||
currentToken.type = TokenType.StringLiteral;
|
currentToken.type = TokenType.StringLiteral;
|
||||||
currentToken.region.end = new(currentLocation);
|
currentToken.region.end = new(currentLocation);
|
||||||
currentToken.data = new Token.StringData("");
|
currentToken.data ??= new Token.StringData("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -823,6 +822,10 @@ class Tokenizer
|
||||||
AppendDataIntHex(ch);
|
AppendDataIntHex(ch);
|
||||||
state = State.HexNumber;
|
state = State.HexNumber;
|
||||||
}
|
}
|
||||||
|
else if(ch == '.')
|
||||||
|
{
|
||||||
|
throw new NotImplementedException($"{currentLocation}: Hex floats at are not implemented");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BacktrackNoTypeChange();
|
BacktrackNoTypeChange();
|
||||||
|
@ -842,6 +845,10 @@ class Tokenizer
|
||||||
currentToken!.type = TokenType.Numeral;
|
currentToken!.type = TokenType.Numeral;
|
||||||
AppendDataIntHex(ch);
|
AppendDataIntHex(ch);
|
||||||
}
|
}
|
||||||
|
else if(ch == '.')
|
||||||
|
{
|
||||||
|
throw new NotImplementedException($"{currentLocation}: Hex floats at are not implemented");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BacktrackNoTypeChange();
|
BacktrackNoTypeChange();
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
local smt = getmetatable("")
|
|
@ -8,6 +8,3 @@
|
||||||
|
|
||||||
|
|
||||||
abc" "123" "sdlfkgj<3" "asldkfj" zzz "" "" "" "" "" "fasd!" "afd" "" "as" zzzz
|
abc" "123" "sdlfkgj<3" "asldkfj" zzz "" "" "" "" "" "fasd!" "afd" "" "as" zzzz
|
||||||
|
|
||||||
"\xf7\xAff\x43"
|
|
||||||
"\u{fa4}\u{1234}\u{12000}\u{123}"
|
|
||||||
|
|
Loading…
Reference in New Issue