Update release

This commit is contained in:
Zihan Chen
2020-07-24 16:23:10 -07:00
parent ce20620f55
commit e2137ca2f5
16 changed files with 4297 additions and 1046 deletions
+322 -61
View File
File diff suppressed because it is too large Load Diff
+81 -15
View File
@@ -7,6 +7,11 @@ DEVELOPER: Zihan Chen(vczh)
/*********************************************************************** /***********************************************************************
.\FILESYSTEM.CPP .\FILESYSTEM.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
#if defined VCZH_MSVC #if defined VCZH_MSVC
#include <Windows.h> #include <Windows.h>
#include <Shlwapi.h> #include <Shlwapi.h>
@@ -841,6 +846,11 @@ Folder
/*********************************************************************** /***********************************************************************
.\HTTPUTILITY.CPP .\HTTPUTILITY.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
#ifdef VCZH_MSVC #ifdef VCZH_MSVC
#include <winhttp.h> #include <winhttp.h>
@@ -855,14 +865,13 @@ namespace vl
HttpRequest HttpRequest
***********************************************************************/ ***********************************************************************/
HttpRequest::HttpRequest()
:port(0)
,secure(false)
{
}
bool HttpRequest::SetHost(const WString& inputQuery) bool HttpRequest::SetHost(const WString& inputQuery)
{ {
if (method == L"")
{
method = L"GET";
}
server = L""; server = L"";
query = L""; query = L"";
port = 0; port = 0;
@@ -940,11 +949,6 @@ HttpRequest
HttpResponse HttpResponse
***********************************************************************/ ***********************************************************************/
HttpResponse::HttpResponse()
:statusCode(0)
{
}
WString HttpResponse::GetBodyUtf8() WString HttpResponse::GetBodyUtf8()
{ {
WString response; WString response;
@@ -1187,6 +1191,11 @@ Utilities
/*********************************************************************** /***********************************************************************
.\LOCALE.CPP .\LOCALE.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
#if defined VCZH_MSVC #if defined VCZH_MSVC
#elif defined VCZH_GCC #elif defined VCZH_GCC
#include <ctype.h> #include <ctype.h>
@@ -1851,6 +1860,11 @@ Locale
/*********************************************************************** /***********************************************************************
.\THREADING.CPP .\THREADING.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
#ifdef VCZH_MSVC #ifdef VCZH_MSVC
namespace vl namespace vl
@@ -2842,6 +2856,11 @@ namespace vl
/*********************************************************************** /***********************************************************************
.\THREADINGLINUX.CPP .\THREADINGLINUX.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
#ifdef VCZH_GCC #ifdef VCZH_GCC
#include <pthread.h> #include <pthread.h>
#include <fcntl.h> #include <fcntl.h>
@@ -3759,6 +3778,11 @@ ThreadLocalStorage
/*********************************************************************** /***********************************************************************
.\STREAM\ACCESSOR.CPP .\STREAM\ACCESSOR.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
#include <string.h> #include <string.h>
namespace vl namespace vl
@@ -4346,6 +4370,11 @@ DecoderStream
/*********************************************************************** /***********************************************************************
.\STREAM\BROADCASTSTREAM.CPP .\STREAM\BROADCASTSTREAM.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl namespace vl
{ {
@@ -4440,7 +4469,8 @@ BroadcastStream
{ {
for(vint i=0;i<streams.Count();i++) for(vint i=0;i<streams.Count();i++)
{ {
streams[i]->Write(_buffer, _size); vint written = streams[i]->Write(_buffer, _size);
CHECK_ERROR(written == _size, L"BroadcastStream::Write(void*, vint)#Failed to copy data to the output stream.");
} }
position+=_size; position+=_size;
return _size; return _size;
@@ -4456,6 +4486,11 @@ BroadcastStream
/*********************************************************************** /***********************************************************************
.\STREAM\CACHESTREAM.CPP .\STREAM\CACHESTREAM.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl namespace vl
{ {
@@ -4760,6 +4795,11 @@ CacheStream
/*********************************************************************** /***********************************************************************
.\STREAM\CHARFORMAT.CPP .\STREAM\CHARFORMAT.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
#if defined VCZH_MSVC #if defined VCZH_MSVC
#include <windows.h> #include <windows.h>
#elif defined VCZH_GCC #elif defined VCZH_GCC
@@ -5861,6 +5901,11 @@ CharEncoder
/*********************************************************************** /***********************************************************************
.\STREAM\COMPRESSIONSTREAM.CPP .\STREAM\COMPRESSIONSTREAM.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl namespace vl
{ {
@@ -6301,6 +6346,11 @@ Helper Functions
/*********************************************************************** /***********************************************************************
.\STREAM\FILESTREAM.CPP .\STREAM\FILESTREAM.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
#if defined VCZH_GCC #if defined VCZH_GCC
#endif #endif
@@ -6529,6 +6579,11 @@ FileStream
/*********************************************************************** /***********************************************************************
.\STREAM\MEMORYSTREAM.CPP .\STREAM\MEMORYSTREAM.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl namespace vl
{ {
@@ -6704,6 +6759,11 @@ MemoryStream
/*********************************************************************** /***********************************************************************
.\STREAM\MEMORYWRAPPERSTREAM.CPP .\STREAM\MEMORYWRAPPERSTREAM.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl namespace vl
{ {
@@ -6850,6 +6910,11 @@ MemoryWrapperStream
/*********************************************************************** /***********************************************************************
.\STREAM\RECORDERSTREAM.CPP .\STREAM\RECORDERSTREAM.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl namespace vl
{ {
@@ -6901,8 +6966,8 @@ RecorderStream
void RecorderStream::Close() void RecorderStream::Close()
{ {
in=0; in = nullptr;
out=0; out = nullptr;
} }
pos_t RecorderStream::Position()const pos_t RecorderStream::Position()const
@@ -6933,7 +6998,8 @@ RecorderStream
vint RecorderStream::Read(void* _buffer, vint _size) vint RecorderStream::Read(void* _buffer, vint _size)
{ {
_size = in->Read(_buffer, _size); _size = in->Read(_buffer, _size);
out->Write(_buffer, _size); vint written = out->Write(_buffer, _size);
CHECK_ERROR(written == _size, L"RecorderStream::Read(void*, vint)#Failed to copy data to the output stream.");
return _size; return _size;
} }
+612 -331
View File
File diff suppressed because it is too large Load Diff
+75
View File
@@ -7,6 +7,11 @@ DEVELOPER: Zihan Chen(vczh)
/*********************************************************************** /***********************************************************************
.\PARSING.CPP .\PARSING.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl namespace vl
{ {
@@ -1082,6 +1087,11 @@ Type Loader
/*********************************************************************** /***********************************************************************
.\PARSINGANALYZER.CPP .\PARSINGANALYZER.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl namespace vl
{ {
@@ -2449,6 +2459,11 @@ ValidateDefinition
/*********************************************************************** /***********************************************************************
.\PARSINGAUTOMATON.CPP .\PARSINGAUTOMATON.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl namespace vl
{ {
@@ -2753,6 +2768,11 @@ Automaton
/*********************************************************************** /***********************************************************************
.\PARSINGAUTOMATON_CLOSURE.CPP .\PARSINGAUTOMATON_CLOSURE.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl namespace vl
{ {
@@ -2900,6 +2920,11 @@ RemoveEpsilonTransitions
/*********************************************************************** /***********************************************************************
.\PARSINGAUTOMATON_EPDA.CPP .\PARSINGAUTOMATON_EPDA.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl namespace vl
{ {
@@ -3080,6 +3105,11 @@ CreateEpsilonPDA
/*********************************************************************** /***********************************************************************
.\PARSINGAUTOMATON_GENERATETABLE.CPP .\PARSINGAUTOMATON_GENERATETABLE.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl namespace vl
{ {
@@ -3784,6 +3814,11 @@ GenerateTable
/*********************************************************************** /***********************************************************************
.\PARSINGAUTOMATON_JPDA.CPP .\PARSINGAUTOMATON_JPDA.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl namespace vl
{ {
@@ -4126,6 +4161,11 @@ MarkLeftRecursiveInJointPDA
/*********************************************************************** /***********************************************************************
.\PARSINGAUTOMATON_MERGESTATES.CPP .\PARSINGAUTOMATON_MERGESTATES.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl namespace vl
{ {
@@ -4417,6 +4457,11 @@ MergeStates
/*********************************************************************** /***********************************************************************
.\PARSINGAUTOMATON_NPDA.CPP .\PARSINGAUTOMATON_NPDA.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl namespace vl
{ {
@@ -4491,6 +4536,11 @@ CreateNondeterministicPDAFromEpsilonPDA
/*********************************************************************** /***********************************************************************
.\PARSINGDEFINITIONS.CPP .\PARSINGDEFINITIONS.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl namespace vl
{ {
@@ -4989,6 +5039,11 @@ ParsingDefinitionWriter
/*********************************************************************** /***********************************************************************
.\PARSINGDEFINITIONS_CREATEPARSERDEFINITION.CPP .\PARSINGDEFINITIONS_CREATEPARSERDEFINITION.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl namespace vl
{ {
@@ -5720,6 +5775,11 @@ Bootstrap
/*********************************************************************** /***********************************************************************
.\PARSINGLOGGING.CPP .\PARSINGLOGGING.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl namespace vl
{ {
@@ -6779,6 +6839,11 @@ Logger (ParsingTreeNode)
/*********************************************************************** /***********************************************************************
.\PARSINGSTATE.CPP .\PARSINGSTATE.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
#if defined(VCZH_GCC) && defined(__clang__) #if defined(VCZH_GCC) && defined(__clang__)
#pragma clang diagnostic push #pragma clang diagnostic push
@@ -7905,6 +7970,11 @@ ParsingTransitionCollector
/*********************************************************************** /***********************************************************************
.\PARSINGTABLE.CPP .\PARSINGTABLE.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl namespace vl
{ {
@@ -8452,6 +8522,11 @@ ParsingTable
/*********************************************************************** /***********************************************************************
.\PARSINGTREE.CPP .\PARSINGTREE.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
#if defined(VCZH_GCC) && defined(__clang__) #if defined(VCZH_GCC) && defined(__clang__)
#pragma clang diagnostic push #pragma clang diagnostic push
+14 -35
View File
@@ -11,11 +11,8 @@ DEVELOPER: Zihan Chen(vczh)
.\PARSINGTREE.H .\PARSINGTREE.H
***********************************************************************/ ***********************************************************************/
/*********************************************************************** /***********************************************************************
Vczh Library++ 3.0 Author: Zihan Chen (vczh)
Developer: Zihan Chen(vczh) Licensed under https://github.com/vczh-libraries/License
Parsing::Parsing Tree
Classes:
***********************************************************************/ ***********************************************************************/
#ifndef VCZH_PARSING_PARSINGTREE #ifndef VCZH_PARSING_PARSINGTREE
@@ -586,11 +583,8 @@ Logging
.\PARSINGDEFINITIONS.H .\PARSINGDEFINITIONS.H
***********************************************************************/ ***********************************************************************/
/*********************************************************************** /***********************************************************************
Vczh Library++ 3.0 Author: Zihan Chen (vczh)
Developer: Zihan Chen(vczh) Licensed under https://github.com/vczh-libraries/License
Parsing::Definitions
Classes:
***********************************************************************/ ***********************************************************************/
#ifndef VCZH_PARSING_PARSINGDEFINITIONS #ifndef VCZH_PARSING_PARSINGDEFINITIONS
@@ -1093,11 +1087,8 @@ Bootstrap
.\PARSINGANALYZER.H .\PARSINGANALYZER.H
***********************************************************************/ ***********************************************************************/
/*********************************************************************** /***********************************************************************
Vczh Library++ 3.0 Author: Zihan Chen (vczh)
Developer: Zihan Chen(vczh) Licensed under https://github.com/vczh-libraries/License
Parsing::Analyzing
Classes:
***********************************************************************/ ***********************************************************************/
#ifndef VCZH_PARSING_PARSINGANALYZER #ifndef VCZH_PARSING_PARSINGANALYZER
@@ -1271,11 +1262,8 @@ Semantic Analyzer
.\PARSINGTABLE.H .\PARSINGTABLE.H
***********************************************************************/ ***********************************************************************/
/*********************************************************************** /***********************************************************************
Vczh Library++ 3.0 Author: Zihan Chen (vczh)
Developer: Zihan Chen(vczh) Licensed under https://github.com/vczh-libraries/License
Parsing::Table
Classes:
***********************************************************************/ ***********************************************************************/
#ifndef VCZH_PARSING_PARSINGTABLE #ifndef VCZH_PARSING_PARSINGTABLE
@@ -1861,11 +1849,8 @@ Helper Functions
.\PARSINGAUTOMATON.H .\PARSINGAUTOMATON.H
***********************************************************************/ ***********************************************************************/
/*********************************************************************** /***********************************************************************
Vczh Library++ 3.0 Author: Zihan Chen (vczh)
Developer: Zihan Chen(vczh) Licensed under https://github.com/vczh-libraries/License
Parsing::Automaton
Classes:
***********************************************************************/ ***********************************************************************/
#ifndef VCZH_PARSING_PARSINGAUTOMATON #ifndef VCZH_PARSING_PARSINGAUTOMATON
@@ -2093,11 +2078,8 @@ Helper: Parsing Table Generating
.\PARSINGSTATE.H .\PARSINGSTATE.H
***********************************************************************/ ***********************************************************************/
/*********************************************************************** /***********************************************************************
Vczh Library++ 3.0 Author: Zihan Chen (vczh)
Developer: Zihan Chen(vczh) Licensed under https://github.com/vczh-libraries/License
Parsing::State
Classes:
***********************************************************************/ ***********************************************************************/
#ifndef VCZH_PARSING_PARSINGSTATE #ifndef VCZH_PARSING_PARSINGSTATE
@@ -2420,11 +2402,8 @@ AST Generating
.\PARSING.H .\PARSING.H
***********************************************************************/ ***********************************************************************/
/*********************************************************************** /***********************************************************************
Vczh Library++ 3.0 Author: Zihan Chen (vczh)
Developer: Zihan Chen(vczh) Licensed under https://github.com/vczh-libraries/License
Parsing::Parser
Classes:
***********************************************************************/ ***********************************************************************/
#ifndef VCZH_PARSING_PARSING #ifndef VCZH_PARSING_PARSING
+25
View File
@@ -7,6 +7,11 @@ DEVELOPER: Zihan Chen(vczh)
/*********************************************************************** /***********************************************************************
.\GUITYPEDESCRIPTOR.CPP .\GUITYPEDESCRIPTOR.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl namespace vl
{ {
@@ -1153,6 +1158,11 @@ Cpp Helper Functions
/*********************************************************************** /***********************************************************************
.\GUITYPEDESCRIPTORBUILDER.CPP .\GUITYPEDESCRIPTORBUILDER.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl namespace vl
{ {
@@ -2438,6 +2448,11 @@ Function Related
/*********************************************************************** /***********************************************************************
.\GUITYPEDESCRIPTORPREDEFINED.CPP .\GUITYPEDESCRIPTORPREDEFINED.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl namespace vl
{ {
@@ -2589,6 +2604,11 @@ IValueException
/*********************************************************************** /***********************************************************************
.\GUITYPEDESCRIPTORREFLECTION.CPP .\GUITYPEDESCRIPTORREFLECTION.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
#include <limits.h> #include <limits.h>
#include <float.h> #include <float.h>
@@ -3443,6 +3463,11 @@ LoadPredefinedTypes
/*********************************************************************** /***********************************************************************
.\GUITYPEDESCRIPTOR_LOG.CPP .\GUITYPEDESCRIPTOR_LOG.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl namespace vl
{ {
+2110 -159
View File
File diff suppressed because it is too large Load Diff
+52 -4
View File
@@ -7,6 +7,11 @@ DEVELOPER: Zihan Chen(vczh)
/*********************************************************************** /***********************************************************************
.\REGEX.CPP .\REGEX.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl namespace vl
{ {
@@ -177,8 +182,6 @@ Regex
} }
Regex::Regex(const WString& code, bool preferPure) Regex::Regex(const WString& code, bool preferPure)
:pure(0)
,rich(0)
{ {
CharRange::List subsets; CharRange::List subsets;
RegexExpression::Ref regex=ParseRegexExpression(code); RegexExpression::Ref regex=ParseRegexExpression(code);
@@ -770,7 +773,6 @@ RegexLexerColorizer
if ((internalState.interTokenState = token.interTokenState)) if ((internalState.interTokenState = token.interTokenState))
{ {
internalState.interTokenId = token.token; internalState.interTokenId = token.token;
internalState.currentState = walker.GetStartState();
} }
if (colorize) if (colorize)
{ {
@@ -814,7 +816,9 @@ RegexLexerColorizer
vint lastFinalStateLength = 0; vint lastFinalStateLength = 0;
vint lastFinalStateToken = -1; vint lastFinalStateToken = -1;
vint lastFinalStateState = -1;
vint tokenStartState = internalState.currentState;
for (vint i = start; i < length; i++) for (vint i = start; i < length; i++)
{ {
vint currentToken = -1; vint currentToken = -1;
@@ -824,27 +828,35 @@ RegexLexerColorizer
if (previousTokenStop) if (previousTokenStop)
{ {
internalState.currentState = walker.GetStartState();
if (proc.extendProc && lastFinalStateToken != -1) if (proc.extendProc && lastFinalStateToken != -1)
{ {
RegexProcessingToken token(start, lastFinalStateLength, lastFinalStateToken, true, nullptr); RegexProcessingToken token(start, lastFinalStateLength, lastFinalStateToken, true, nullptr);
CallExtendProcAndColorizeProc(input, length, token, colorize); CallExtendProcAndColorizeProc(input, length, token, colorize);
if (token.completeToken)
{
internalState.currentState = walker.GetStartState();
}
return start + token.length; return start + token.length;
} }
else if (i == start) else if (i == start)
{
if (tokenStartState == GetStartState())
{ {
if (colorize) if (colorize)
{ {
proc.colorizeProc(proc.argument, start, 1, -1); proc.colorizeProc(proc.argument, start, 1, -1);
} }
internalState.currentState = walker.GetStartState();
return i + 1; return i + 1;
} }
}
else else
{ {
if (colorize) if (colorize)
{ {
proc.colorizeProc(proc.argument, start, lastFinalStateLength, lastFinalStateToken); proc.colorizeProc(proc.argument, start, lastFinalStateLength, lastFinalStateToken);
} }
internalState.currentState = lastFinalStateState;
return start + lastFinalStateLength; return start + lastFinalStateLength;
} }
} }
@@ -853,6 +865,7 @@ RegexLexerColorizer
{ {
lastFinalStateLength = i + 1 - start; lastFinalStateLength = i + 1 - start;
lastFinalStateToken = currentToken; lastFinalStateToken = currentToken;
lastFinalStateState = internalState.currentState;
} }
} }
@@ -1009,6 +1022,11 @@ RegexLexer
/*********************************************************************** /***********************************************************************
.\REGEXAUTOMATON.CPP .\REGEXAUTOMATON.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl namespace vl
{ {
@@ -1370,6 +1388,11 @@ Helpers
/*********************************************************************** /***********************************************************************
.\REGEXDATA.CPP .\REGEXDATA.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl namespace vl
{ {
@@ -1458,6 +1481,11 @@ CharRange
/*********************************************************************** /***********************************************************************
.\REGEXEXPRESSION.CPP .\REGEXEXPRESSION.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl namespace vl
{ {
@@ -2392,6 +2420,11 @@ Expression::Apply
/*********************************************************************** /***********************************************************************
.\REGEXPARSER.CPP .\REGEXPARSER.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl namespace vl
{ {
@@ -3090,6 +3123,11 @@ Helper Functions
/*********************************************************************** /***********************************************************************
.\REGEXPURE.CPP .\REGEXPURE.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl namespace vl
{ {
@@ -3322,6 +3360,11 @@ PureInterpretor
/*********************************************************************** /***********************************************************************
.\REGEXRICH.CPP .\REGEXRICH.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl namespace vl
{ {
@@ -3782,6 +3825,11 @@ RichInterpretor
/*********************************************************************** /***********************************************************************
.\REGEXWRITER.CPP .\REGEXWRITER.CPP
***********************************************************************/ ***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl namespace vl
{ {
+731 -166
View File
File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+4 -4
View File
@@ -1,4 +1,4 @@
function Start-Process-And-Wait([String[][]] $Pairs, [Boolean]$Inline = $false, [String]$workingDirectory = "") { function Start-Process-And-Wait([String[][]] $Pairs, [Boolean]$Inline = $false, [String]$WorkingDirectory = "", [Boolean]$ThrowOnCrash = $true) {
$processes = New-Object System.Diagnostics.Process[] $Pairs.Length $processes = New-Object System.Diagnostics.Process[] $Pairs.Length
for ($i = 0; $i -lt $Pairs.Length; $i++) { for ($i = 0; $i -lt $Pairs.Length; $i++) {
Write-Host " Running: $($Pairs[$i][0]) $($Pairs[$i][1])" -ForegroundColor DarkGray Write-Host " Running: $($Pairs[$i][0]) $($Pairs[$i][1])" -ForegroundColor DarkGray
@@ -9,8 +9,8 @@ function Start-Process-And-Wait([String[][]] $Pairs, [Boolean]$Inline = $false,
} }
$arguments.Add("PassThru", $true) $arguments.Add("PassThru", $true)
$arguments.Add("NoNewWindow", $Inline) $arguments.Add("NoNewWindow", $Inline)
if ($workingDirectory -ne "") { if ($WorkingDirectory -ne "") {
$arguments.Add("WorkingDirectory", $workingDirectory) $arguments.Add("WorkingDirectory", $WorkingDirectory)
} }
$processes[$i] = Start-Process $Pairs[$i][0] @arguments $processes[$i] = Start-Process $Pairs[$i][0] @arguments
@@ -21,7 +21,7 @@ function Start-Process-And-Wait([String[][]] $Pairs, [Boolean]$Inline = $false,
$process = $processes[$i] $process = $processes[$i]
$process_handle = $process.Handle $process_handle = $process.Handle
$process.WaitForExit() $process.WaitForExit()
if ($process.ExitCode -ne 0) { if (($process.ExitCode -ne 0) -and $ThrowOnCrash) {
Write-Host " Crashes($($process.ExitCode)): $($Pairs[$i][0]) $($Pairs[$i][1])" -ForegroundColor Red Write-Host " Crashes($($process.ExitCode)): $($Pairs[$i][0]) $($Pairs[$i][1])" -ForegroundColor Red
$failed = $true $failed = $true
} }
Binary file not shown.
Binary file not shown.