ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/runtime/IBSQLParser.pas
(Generate patch)

Comparing ibx/trunk/runtime/IBSQLParser.pas (file contents):
Revision 21 by tony, Thu Feb 26 10:33:34 2015 UTC vs.
Revision 39 by tony, Tue May 17 08:14:52 2016 UTC

# Line 27 | Line 27 | unit IBSQLParser;
27  
28   {$Mode Delphi}
29  
30 + {$IF FPC_FULLVERSION >= 20700 }
31 + {$codepage UTF8}
32 + {$ENDIF}
33 +
34   interface
35  
36   uses Classes, DB;
# Line 288 | Line 292 | begin
292        if not (FState in [stInComment,stInCommentLine]) then
293        begin
294          AddToSQL(':');
295 <        SetState(stInParam);
295 >        if not (FState in [stInSingleQuotes,stInDoubleQuotes]) then
296 >          SetState(stInParam);
297        end;
298  
299      sqSemiColon:
# Line 447 | Line 452 | begin
452            FState := PopState;
453          stInDoubleQuotes,
454          stInSingleQuotes:
455 <          raise Exception.Create(sNoEndToThis);
455 >          Begin
456 >            FLiteral := FLiteral + #$0A;
457 >            Exit;
458 >          End;
459          end;
460          AddToSQL(' ');
461          Exit;
# Line 782 | Line 790 | begin
790      Inc(index)
791    end;
792  
793 <  if (Result = sqString)  and not (FState in [stInComment,stInCommentLine])then
793 >  if (Result = sqString)  and not (FState in [stInComment,stInCommentLine, stInSingleQuotes,stInDoubleQuotes])then
794      Result := Check4ReservedWord(FString);
795  
796    if (index > Length(Line)) then
797 <    if Result = sqNone then
797 >  begin
798 >    if  (Result = sqNone) then
799        Result := sqEOL
800      else
801      if (FLastSymbol = sqNone) and (Result <> sqEOL) then
802        FLastSymbol := sqEOL;
803 +  end;
804  
805   end;
806  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines