mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-24 12:35:31 +00:00
This commit is contained in:
parent
1ae736efa5
commit
fdecdc68e9
2 changed files with 17 additions and 1 deletions
|
|
@ -103,6 +103,19 @@ namespace Cosmos.Compiler.XSharp {
|
||||||
|
|
||||||
protected enum CharType { WhiteSpace, Identifier, Symbol };
|
protected enum CharType { WhiteSpace, Identifier, Symbol };
|
||||||
protected void Parse() {
|
protected void Parse() {
|
||||||
|
ParseText();
|
||||||
|
Parse2();
|
||||||
|
mTokens = new TokenList(mTokensTemp);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Rescan token patterns
|
||||||
|
protected void Parse2() {
|
||||||
|
for (int i = 0; i < mTokensTemp.Count; i++) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Initial Parse to convert text to tokens
|
||||||
|
protected void ParseText() {
|
||||||
char xLastChar = ' ';
|
char xLastChar = ' ';
|
||||||
CharType xLastCharType = CharType.WhiteSpace;
|
CharType xLastCharType = CharType.WhiteSpace;
|
||||||
char xChar;
|
char xChar;
|
||||||
|
|
@ -131,13 +144,13 @@ namespace Cosmos.Compiler.XSharp {
|
||||||
if (mStart < mData.Length) {
|
if (mStart < mData.Length) {
|
||||||
NewToken(ref i);
|
NewToken(ref i);
|
||||||
}
|
}
|
||||||
mTokens = new TokenList(mTokensTemp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Parser(string aData, bool aIncludeWhiteSpace) {
|
public Parser(string aData, bool aIncludeWhiteSpace) {
|
||||||
mData = aData;
|
mData = aData;
|
||||||
mIncludeWhiteSpace = aIncludeWhiteSpace;
|
mIncludeWhiteSpace = aIncludeWhiteSpace;
|
||||||
mAllWhitespace = true;
|
mAllWhitespace = true;
|
||||||
|
|
||||||
Parse();
|
Parse();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,9 @@ InterruptHandler TracerEntry {
|
||||||
|
|
||||||
PushAll
|
PushAll
|
||||||
|
|
||||||
|
# Temp Test
|
||||||
|
EAX = $FF
|
||||||
|
|
||||||
# Save current ESP so we can look at the results of PushAll later
|
# Save current ESP so we can look at the results of PushAll later
|
||||||
PushAllPtr = ESP
|
PushAllPtr = ESP
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue