mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 05:19:14 +02:00
codetools: cfgscript: nicer error message if semicolon is missing
git-svn-id: trunk@37390 -
This commit is contained in:
parent
752c8adef7
commit
b88a39ccca
@ -30,7 +30,7 @@
|
|||||||
boolean operators: not, and, or, xor
|
boolean operators: not, and, or, xor
|
||||||
operators: =, <>, >, <, <=, >=, +
|
operators: =, <>, >, <, <=, >=, +
|
||||||
variables
|
variables
|
||||||
constants: decimal, hex, octal, binary, string, #decimal
|
constants: decimal, $hex, &octal, %binary, 'string', #character
|
||||||
functions: string(), integer(), int64(), defined(), undefined()
|
functions: string(), integer(), int64(), defined(), undefined()
|
||||||
procedures: undefine()
|
procedures: undefine()
|
||||||
assignments: :=, +=
|
assignments: :=, +=
|
||||||
@ -1328,7 +1328,7 @@ procedure TCTConfigScriptEngine.RunStatement(Skip: boolean);
|
|||||||
|
|
||||||
procedure ErrorUnexpectedAtom;
|
procedure ErrorUnexpectedAtom;
|
||||||
begin
|
begin
|
||||||
AddError(Format(ctsExpectedStatementButFound, [GetAtomOrNothing]))
|
AddError(Format(ctsExpectedSemicolonOfStatementButFound, [GetAtomOrNothing]))
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -1505,7 +1505,7 @@ begin
|
|||||||
{$IFDEF VerboseCTCfgScript}
|
{$IFDEF VerboseCTCfgScript}
|
||||||
debugln(['TCTConfigScriptEngine.RunAssignment Operator=',GetAtom]);
|
debugln(['TCTConfigScriptEngine.RunAssignment Operator=',GetAtom]);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
// read :=
|
// read := or +=
|
||||||
if AtomStart^=#0 then begin
|
if AtomStart^=#0 then begin
|
||||||
AddError(ctsMissing);
|
AddError(ctsMissing);
|
||||||
exit;
|
exit;
|
||||||
@ -1530,7 +1530,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFDEF VerboseCTCfgScript}
|
{$IFDEF VerboseCTCfgScript}
|
||||||
debugln(['TCTConfigScriptEngine.RunAssignment AFTER ',GetIdentifier(VarStart),' = ',dbgs(Variable)]);
|
debugln(['TCTConfigScriptEngine.RunAssignment AFTER ',GetIdentifier(VarStart),' = ',dbgs(Variable),' Atom=',GetAtom]);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
// clean up stack
|
// clean up stack
|
||||||
@ -2296,6 +2296,12 @@ end;
|
|||||||
|
|
||||||
function TCTConfigScriptEngine.Execute(const Source: string;
|
function TCTConfigScriptEngine.Execute(const Source: string;
|
||||||
StopAfterErrors: integer): boolean;
|
StopAfterErrors: integer): boolean;
|
||||||
|
|
||||||
|
procedure ExpectedSemicolon;
|
||||||
|
begin
|
||||||
|
AddError(Format(ctsExpectedSemicolonOfStatementButFound, [GetAtomOrNothing]))
|
||||||
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
Err: TCTCfgScriptError;
|
Err: TCTCfgScriptError;
|
||||||
begin
|
begin
|
||||||
@ -2319,6 +2325,8 @@ begin
|
|||||||
ReadRawNextPascalAtom(Src,AtomStart);
|
ReadRawNextPascalAtom(Src,AtomStart);
|
||||||
while Src^<>#0 do begin
|
while Src^<>#0 do begin
|
||||||
RunStatement(false);
|
RunStatement(false);
|
||||||
|
if not (AtomStart^ in [#0,';']) then
|
||||||
|
ExpectedSemicolon;
|
||||||
ReadRawNextPascalAtom(Src,AtomStart);
|
ReadRawNextPascalAtom(Src,AtomStart);
|
||||||
end;
|
end;
|
||||||
except
|
except
|
||||||
|
@ -165,7 +165,7 @@ ResourceString
|
|||||||
ctsPropertyCurrentNotFound = 'property Current not found';
|
ctsPropertyCurrentNotFound = 'property Current not found';
|
||||||
ctsEnumerationType = 'enumeration type';
|
ctsEnumerationType = 'enumeration type';
|
||||||
ctsType = 'type';
|
ctsType = 'type';
|
||||||
ctsExpectedStatementButFound = 'expected statement, but found %s';
|
ctsExpectedSemicolonOfStatementButFound = 'expected ; of statement, but found %s';
|
||||||
ctsUnexpectedKeyword2 = 'unexpected keyword %s';
|
ctsUnexpectedKeyword2 = 'unexpected keyword %s';
|
||||||
ctsBeginAtWithoutEnd = 'begin at %s without end';
|
ctsBeginAtWithoutEnd = 'begin at %s without end';
|
||||||
ctsThenExpectedButFound = 'then expected, but %s found';
|
ctsThenExpectedButFound = 'then expected, but %s found';
|
||||||
|
@ -355,8 +355,8 @@ msgstr ""
|
|||||||
msgid "expected identifier, but found %s"
|
msgid "expected identifier, but found %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexpectedstatementbutfound
|
#: codetoolsstrconsts.ctsexpectedsemicolonofstatementbutfound
|
||||||
msgid "expected statement, but found %s"
|
msgid "expected ; of statement, but found %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
||||||
|
@ -356,8 +356,8 @@ msgstr ""
|
|||||||
msgid "expected identifier, but found %s"
|
msgid "expected identifier, but found %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexpectedstatementbutfound
|
#: codetoolsstrconsts.ctsexpectedsemicolonofstatementbutfound
|
||||||
msgid "expected statement, but found %s"
|
msgid "expected ; of statement, but found %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
||||||
|
@ -357,9 +357,9 @@ msgstr ":= erwartet, aber %s gefunden"
|
|||||||
msgid "expected identifier, but found %s"
|
msgid "expected identifier, but found %s"
|
||||||
msgstr "Bezeichner erwartet, aber %s gefunden"
|
msgstr "Bezeichner erwartet, aber %s gefunden"
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexpectedstatementbutfound
|
#: codetoolsstrconsts.ctsexpectedsemicolonofstatementbutfound
|
||||||
msgid "expected statement, but found %s"
|
msgid "expected ; of statement, but found %s"
|
||||||
msgstr "Anweisung erwartet, aber %s gefunden"
|
msgstr ""
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
||||||
msgid "exports clause only allowed in libraries"
|
msgid "exports clause only allowed in libraries"
|
||||||
|
@ -355,8 +355,8 @@ msgstr ""
|
|||||||
msgid "expected identifier, but found %s"
|
msgid "expected identifier, but found %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexpectedstatementbutfound
|
#: codetoolsstrconsts.ctsexpectedsemicolonofstatementbutfound
|
||||||
msgid "expected statement, but found %s"
|
msgid "expected ; of statement, but found %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
||||||
|
@ -348,8 +348,8 @@ msgstr ""
|
|||||||
msgid "expected identifier, but found %s"
|
msgid "expected identifier, but found %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexpectedstatementbutfound
|
#: codetoolsstrconsts.ctsexpectedsemicolonofstatementbutfound
|
||||||
msgid "expected statement, but found %s"
|
msgid "expected ; of statement, but found %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
||||||
|
@ -356,8 +356,8 @@ msgstr ""
|
|||||||
msgid "expected identifier, but found %s"
|
msgid "expected identifier, but found %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexpectedstatementbutfound
|
#: codetoolsstrconsts.ctsexpectedsemicolonofstatementbutfound
|
||||||
msgid "expected statement, but found %s"
|
msgid "expected ; of statement, but found %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
||||||
|
@ -355,9 +355,9 @@ msgstr "מחכה ל =:, אבל נמצא %s"
|
|||||||
msgid "expected identifier, but found %s"
|
msgid "expected identifier, but found %s"
|
||||||
msgstr "מחכה למזהה, אבל נמצא %s"
|
msgstr "מחכה למזהה, אבל נמצא %s"
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexpectedstatementbutfound
|
#: codetoolsstrconsts.ctsexpectedsemicolonofstatementbutfound
|
||||||
msgid "expected statement, but found %s"
|
msgid "expected ; of statement, but found %s"
|
||||||
msgstr "מחכה למשפט, אבל נמצא %s"
|
msgstr ""
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
||||||
msgid "exports clause only allowed in libraries"
|
msgid "exports clause only allowed in libraries"
|
||||||
|
@ -356,8 +356,8 @@ msgstr ""
|
|||||||
msgid "expected identifier, but found %s"
|
msgid "expected identifier, but found %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexpectedstatementbutfound
|
#: codetoolsstrconsts.ctsexpectedsemicolonofstatementbutfound
|
||||||
msgid "expected statement, but found %s"
|
msgid "expected ; of statement, but found %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
||||||
|
@ -353,8 +353,8 @@ msgstr "era atteso :=, ma è stato trovato %s"
|
|||||||
msgid "expected identifier, but found %s"
|
msgid "expected identifier, but found %s"
|
||||||
msgstr "era atteso un identificatore, ma è stato trovato %s"
|
msgstr "era atteso un identificatore, ma è stato trovato %s"
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexpectedstatementbutfound
|
#: codetoolsstrconsts.ctsexpectedsemicolonofstatementbutfound
|
||||||
msgid "expected statement, but found %s"
|
msgid "expected ; of statement, but found %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
||||||
|
@ -356,8 +356,8 @@ msgstr ""
|
|||||||
msgid "expected identifier, but found %s"
|
msgid "expected identifier, but found %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexpectedstatementbutfound
|
#: codetoolsstrconsts.ctsexpectedsemicolonofstatementbutfound
|
||||||
msgid "expected statement, but found %s"
|
msgid "expected ; of statement, but found %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
||||||
|
@ -355,8 +355,8 @@ msgstr ""
|
|||||||
msgid "expected identifier, but found %s"
|
msgid "expected identifier, but found %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexpectedstatementbutfound
|
#: codetoolsstrconsts.ctsexpectedsemicolonofstatementbutfound
|
||||||
msgid "expected statement, but found %s"
|
msgid "expected ; of statement, but found %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
||||||
|
@ -359,8 +359,8 @@ msgstr ""
|
|||||||
msgid "expected identifier, but found %s"
|
msgid "expected identifier, but found %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexpectedstatementbutfound
|
#: codetoolsstrconsts.ctsexpectedsemicolonofstatementbutfound
|
||||||
msgid "expected statement, but found %s"
|
msgid "expected ; of statement, but found %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
||||||
|
@ -348,8 +348,8 @@ msgstr ""
|
|||||||
msgid "expected identifier, but found %s"
|
msgid "expected identifier, but found %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexpectedstatementbutfound
|
#: codetoolsstrconsts.ctsexpectedsemicolonofstatementbutfound
|
||||||
msgid "expected statement, but found %s"
|
msgid "expected ; of statement, but found %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
||||||
|
@ -355,9 +355,9 @@ msgstr "\":=\" esperado, mas %s encontrado"
|
|||||||
msgid "expected identifier, but found %s"
|
msgid "expected identifier, but found %s"
|
||||||
msgstr "identificador esperado, mas encontrado %s"
|
msgstr "identificador esperado, mas encontrado %s"
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexpectedstatementbutfound
|
#: codetoolsstrconsts.ctsexpectedsemicolonofstatementbutfound
|
||||||
msgid "expected statement, but found %s"
|
msgid "expected ; of statement, but found %s"
|
||||||
msgstr "declaração esperada, mas encontrado %s"
|
msgstr ""
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
||||||
msgid "exports clause only allowed in libraries"
|
msgid "exports clause only allowed in libraries"
|
||||||
|
@ -354,9 +354,9 @@ msgstr "\":=\" esperado, mas %s encontrado"
|
|||||||
msgid "expected identifier, but found %s"
|
msgid "expected identifier, but found %s"
|
||||||
msgstr "identificador esperado, mas encontrado %s"
|
msgstr "identificador esperado, mas encontrado %s"
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexpectedstatementbutfound
|
#: codetoolsstrconsts.ctsexpectedsemicolonofstatementbutfound
|
||||||
msgid "expected statement, but found %s"
|
msgid "expected ; of statement, but found %s"
|
||||||
msgstr "declaração esperada, mas encontrado %s"
|
msgstr ""
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
||||||
msgid "exports clause only allowed in libraries"
|
msgid "exports clause only allowed in libraries"
|
||||||
|
@ -354,9 +354,9 @@ msgstr "ожидается оператор :=, но найдено %s"
|
|||||||
msgid "expected identifier, but found %s"
|
msgid "expected identifier, but found %s"
|
||||||
msgstr "ожидается идентификатор, но найдено %s"
|
msgstr "ожидается идентификатор, но найдено %s"
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexpectedstatementbutfound
|
#: codetoolsstrconsts.ctsexpectedsemicolonofstatementbutfound
|
||||||
msgid "expected statement, but found %s"
|
msgid "expected ; of statement, but found %s"
|
||||||
msgstr "ожидается оператор, но найдено %s"
|
msgstr ""
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
||||||
msgid "exports clause only allowed in libraries"
|
msgid "exports clause only allowed in libraries"
|
||||||
|
@ -354,8 +354,8 @@ msgstr ""
|
|||||||
msgid "expected identifier, but found %s"
|
msgid "expected identifier, but found %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexpectedstatementbutfound
|
#: codetoolsstrconsts.ctsexpectedsemicolonofstatementbutfound
|
||||||
msgid "expected statement, but found %s"
|
msgid "expected ; of statement, but found %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
||||||
|
@ -356,9 +356,9 @@ msgstr "очікується :=, але знайдено %s"
|
|||||||
msgid "expected identifier, but found %s"
|
msgid "expected identifier, but found %s"
|
||||||
msgstr "очікується ідентифікатор, але знайдено %s"
|
msgstr "очікується ідентифікатор, але знайдено %s"
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexpectedstatementbutfound
|
#: codetoolsstrconsts.ctsexpectedsemicolonofstatementbutfound
|
||||||
msgid "expected statement, but found %s"
|
msgid "expected ; of statement, but found %s"
|
||||||
msgstr "очікується інструкція, але знайдено %s"
|
msgstr ""
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
||||||
msgid "exports clause only allowed in libraries"
|
msgid "exports clause only allowed in libraries"
|
||||||
|
@ -358,8 +358,8 @@ msgstr ""
|
|||||||
msgid "expected identifier, but found %s"
|
msgid "expected identifier, but found %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexpectedstatementbutfound
|
#: codetoolsstrconsts.ctsexpectedsemicolonofstatementbutfound
|
||||||
msgid "expected statement, but found %s"
|
msgid "expected ; of statement, but found %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
#: codetoolsstrconsts.ctsexportsclauseonlyallowedinlibraries
|
||||||
|
@ -2178,6 +2178,12 @@ begin
|
|||||||
s:=GetDefaultTargetCPU;
|
s:=GetDefaultTargetCPU;
|
||||||
Result.Values['TargetCPU']:=s;
|
Result.Values['TargetCPU']:=s;
|
||||||
end;
|
end;
|
||||||
|
// IDE values
|
||||||
|
{Result.Values['IDEOS']:=GetCompiledTargetOS;
|
||||||
|
Result.Values['IDESrcOS']:=GetDefaultSrcOSForTargetOS(GetCompiledTargetOS);
|
||||||
|
Result.Values['IDESrcOS2']:=GetDefaultSrcOS2ForTargetOS(GetCompiledTargetOS);
|
||||||
|
Result.Values['IDECPU']:=GetCompiledTargetCPU;
|
||||||
|
Result.Values['IDELCLWidgetType']:=LCLPlatformDirNames(GetDefaultLCLWidgetType);}
|
||||||
|
|
||||||
{$IFDEF VerboseBuildMacros}
|
{$IFDEF VerboseBuildMacros}
|
||||||
Result.WriteDebugReport('OnGetBuildMacroValues project values');
|
Result.WriteDebugReport('OnGetBuildMacroValues project values');
|
||||||
|
@ -22,6 +22,7 @@ type
|
|||||||
TTestCodetoolsCfgScript = class(TTestCase)
|
TTestCodetoolsCfgScript = class(TTestCase)
|
||||||
protected
|
protected
|
||||||
procedure TestResult(Script, ExpectedResult: string);
|
procedure TestResult(Script, ExpectedResult: string);
|
||||||
|
procedure TestSyntaxError(Script, ExpectedError: string);
|
||||||
published
|
published
|
||||||
procedure TestCfgScript;
|
procedure TestCfgScript;
|
||||||
end;
|
end;
|
||||||
@ -55,12 +56,31 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TTestCodetoolsCfgScript.TestSyntaxError(Script, ExpectedError: string
|
||||||
|
);
|
||||||
|
var
|
||||||
|
Engine: TCTConfigScriptEngine;
|
||||||
|
begin
|
||||||
|
Engine:=TCTConfigScriptEngine.Create;
|
||||||
|
try
|
||||||
|
Engine.MaxErrorCount:=1;
|
||||||
|
if Engine.Execute(Script) then begin
|
||||||
|
AssertEquals('Syntax error in script not recognized: "'+Script+'"',true,false);
|
||||||
|
end else begin
|
||||||
|
//writeln('TTestCodetoolsCfgScript.TestSyntaxError ',Engine.Errors[0].Msg);
|
||||||
|
AssertEquals(Script,ExpectedError,Engine.Errors[0].Msg);
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
Engine.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TTestCodetoolsCfgScript.TestCfgScript;
|
procedure TTestCodetoolsCfgScript.TestCfgScript;
|
||||||
begin
|
begin
|
||||||
TestResult('Result:=2;','2');
|
TestResult('Result:=2;','2');
|
||||||
TestResult('a:=2; b:=a; Result:=b;','2');
|
TestResult('a:=2; b:=a; Result:=b;','2');
|
||||||
TestResult('Result:=1+2;','3');
|
TestResult('Result:=1+2;','3');
|
||||||
//TestResult('Result:=1+2*3;','7');
|
TestSyntaxError('{invalid operator * }Result:=2*3;','expected ; of statement, but found *');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
|
@ -120,6 +120,9 @@
|
|||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
<Version Value="11"/>
|
<Version Value="11"/>
|
||||||
<PathDelim Value="\"/>
|
<PathDelim Value="\"/>
|
||||||
|
<Target>
|
||||||
|
<Filename Value="$MakeExe(runtests)"/>
|
||||||
|
</Target>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<OtherUnitFiles Value="bugs;lcltests;codetoolstests;lazutils"/>
|
<OtherUnitFiles Value="bugs;lcltests;codetoolstests;lazutils"/>
|
||||||
<UnitOutputDirectory Value="units\$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="units\$(TargetCPU)-$(TargetOS)"/>
|
||||||
|
Loading…
Reference in New Issue
Block a user