diff --git a/source2/Compiler/Cosmos.XSharp/Parser.cs b/source2/Compiler/Cosmos.XSharp/Parser.cs index 287ec6aa5..e904e8995 100644 --- a/source2/Compiler/Cosmos.XSharp/Parser.cs +++ b/source2/Compiler/Cosmos.XSharp/Parser.cs @@ -103,6 +103,19 @@ namespace Cosmos.Compiler.XSharp { protected enum CharType { WhiteSpace, Identifier, Symbol }; 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 = ' '; CharType xLastCharType = CharType.WhiteSpace; char xChar; @@ -131,13 +144,13 @@ namespace Cosmos.Compiler.XSharp { if (mStart < mData.Length) { NewToken(ref i); } - mTokens = new TokenList(mTokensTemp); } public Parser(string aData, bool aIncludeWhiteSpace) { mData = aData; mIncludeWhiteSpace = aIncludeWhiteSpace; mAllWhitespace = true; + Parse(); } } diff --git a/source2/Users/Matthijs/MatthijsPlayground/Test.xs b/source2/Users/Matthijs/MatthijsPlayground/Test.xs index 402611d3b..14e8ac7c6 100644 --- a/source2/Users/Matthijs/MatthijsPlayground/Test.xs +++ b/source2/Users/Matthijs/MatthijsPlayground/Test.xs @@ -38,6 +38,9 @@ InterruptHandler TracerEntry { PushAll + # Temp Test + EAX = $FF + # Save current ESP so we can look at the results of PushAll later PushAllPtr = ESP