diff --git a/uppsrc/Core/parser.cpp b/uppsrc/Core/parser.cpp index 44571e372..ee2d5ce42 100644 --- a/uppsrc/Core/parser.cpp +++ b/uppsrc/Core/parser.cpp @@ -480,7 +480,8 @@ void CParser::SetPos(const CParser::Pos& p) term = p.ptr; wspc = p.wspc; lineptr = p.lineptr; - DoSpaces(); + if(skipspaces) + DoSpaces(); } CParser::CParser(const char *ptr) @@ -513,8 +514,8 @@ void CParser::Set(const char *_ptr, const char *_fn, int _line) term = lineptr = wspc = _ptr; fn = _fn; line = _line; - skipspaces = true; - Spaces(); + if(skipspaces) + Spaces(); LLOG("Set " << fn << ":" << line); } @@ -523,7 +524,6 @@ void CParser::Set(const char *_ptr) Set(_ptr, "", 1); } - inline void NextCStringLine(String& t, const char *linepfx, int& pl) { t << "\"\r\n" << (linepfx ? linepfx : "") << "\""; diff --git a/uppsrc/Core/src.tpp/CParser$en-us.tpp b/uppsrc/Core/src.tpp/CParser$en-us.tpp index c1238c306..e6be2ee24 100644 --- a/uppsrc/Core/src.tpp/CParser$en-us.tpp +++ b/uppsrc/Core/src.tpp/CParser$en-us.tpp @@ -418,8 +418,7 @@ onst]_[@(0.0.255) char]_`*[*@3 ptr], [@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 [s5;:CParser`:`:Set`(const char`*`): [@(0.0.255) void]_[* Set]([@(0.0.255) const]_[@(0.0.255) c har]_`*[*@3 ptr])&] [s2;%% Sets the new input string.&] -[s0;%% &] -[s0;%% &] +[s3;%% &] [s0;%% &] [ {{10000@(113.42.0) [s0;%% [*@7;4 CParser`::Error]]}}&] [s3; &] diff --git a/uppsrc/Core/srcdoc.tpp/ValueReference$en-us.tpp b/uppsrc/Core/srcdoc.tpp/ValueReference$en-us.tpp index e3b7d3d1d..5c11ae876 100644 --- a/uppsrc/Core/srcdoc.tpp/ValueReference$en-us.tpp +++ b/uppsrc/Core/srcdoc.tpp/ValueReference$en-us.tpp @@ -12,6 +12,7 @@ topic "Rules for references to Value internal maps elements"; [a83;*R6 $$10,12#31310162474203024125188417583966:caption] [b83;*2 $$11,12#07864147445237544204411237157677:title] [b42;a42;2 $$12,12#45413000475342174754091244180557:text] +[l321;t246;C@5;1 $$13,13#20902679421464641399138805415013:code] [{_}%EN-US [s10; Rules for references to Value internal maps elements&] [s0; Value is originally designed as nonmutable concrete Value of @@ -29,17 +30,18 @@ including just reading it.]&] [s0; &] [s0; Examples of invalid code:&] [s0; &] -[s0; [*C@5 Value m;]&] -[s0; [*C@5 Value`& x `= m(`"key`");]&] -[s0; [*C@5 x `= m; // using m as source invalidates x]&] -[s0;*C@5 &] -[s0; [*C@5 Value m;]&] -[s0; [*C@5 Value`& x `= m(`"key`");]&] -[s0; [*C@5 Value`& y `= m(`"key2`"); // Invalidates x]&] -[s0; [*C@5 x `= 123; // undefined]&] -[s0;*C@5 &] -[s0; [*C@5 Value m;]&] -[s0; [*C@5 Value`& x `= m.At(1);]&] -[s0; [*C@5 Value m2 `= m; // Invalidates x]&] -[s0; [*C@5 x `= `"fail`"; // undefined]&] +[s13; &] +[s13; Value m;&] +[s13; Value`& x `= m(`"key`");&] +[s13; x `= m; // using m as source invalidates x&] +[s13; ....&] +[s13; Value m;&] +[s13; Value`& x `= m(`"key`");&] +[s13; Value`& y `= m(`"key2`"); // Invalidates x&] +[s13; x `= 123; // undefined&] +[s13; ....&] +[s13; Value m;&] +[s13; Value`& x `= m.At(1);&] +[s13; Value m2 `= m; // Invalidates x&] +[s13; x `= `"fail`"; // undefined&] [s0; ]] \ No newline at end of file