Forráskód Böngészése

+ support & to escape keywords being a solution for #14553

git-svn-id: trunk@13825 -
florian 16 éve
szülő
commit
00049897b3
3 módosított fájl, 54 hozzáadás és 1 törlés
  1. 1 0
      .gitattributes
  2. 8 1
      compiler/scanner.pas
  3. 45 0
      tests/webtbs/tw14553.pp

+ 1 - 0
.gitattributes

@@ -9315,6 +9315,7 @@ tests/webtbs/tw1450.pp svneol=native#text/plain
 tests/webtbs/tw1451.pp svneol=native#text/plain
 tests/webtbs/tw14514.pp svneol=native#text/plain
 tests/webtbs/tw14536.pp svneol=native#text/plain
+tests/webtbs/tw14553.pp svneol=native#text/pascal
 tests/webtbs/tw1470.pp svneol=native#text/plain
 tests/webtbs/tw1472.pp svneol=native#text/plain
 tests/webtbs/tw1477.pp svneol=native#text/plain

+ 8 - 1
compiler/scanner.pas

@@ -3403,7 +3403,14 @@ In case not, the value returned can be arbitrary.
                  if m_fpc in current_settings.modeswitches then
                   begin
                     readnumber;
-                    token:=_INTCONST;
+                    if length(pattern)=1 then
+                      begin
+                        readstring;
+                        token:=_ID;
+                        idtoken:=_ID;
+                      end
+                    else
+                      token:=_INTCONST;
                     goto exit_label;
                   end
                  else if m_mac in current_settings.modeswitches then

+ 45 - 0
tests/webtbs/tw14553.pp

@@ -0,0 +1,45 @@
+{ %target=win32,win64 }
+unit tw14553;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+  Classes, SysUtils, ComObj, Variants;
+
+Procedure MI_Connect(H1,H2,H3:String);
+Procedure MI_Disconnect;
+
+Var MI1Open,MI2Open,MI3Open:Boolean;
+    MI1,MI2,MI3:Variant;
+
+implementation
+
+Procedure MI_Connect(H1,H2,H3:String);
+Begin
+ MI1:=CreateOleObject('MapInfo.Application');
+ MI2:=CreateOleObject('MapInfo.Application');
+ MI3:=CreateOleObject('MapInfo.Application');
+
+ MI1.&do('Set Application Window '+H1);
+ MI2.&do('Set Application Window '+H2);
+ MI3.&do('Set Application Window '+H3);
+
+ MI1.&do('Set Next Document Parent '+H1+' Style 1');
+ MI2.&do('Set Next Document Parent '+H2+' Style 1');
+ MI3.&do('Set Next Document Parent '+H3+' Style 1');
+
+ MI1Open:=False;
+ MI2Open:=False;
+ MI3Open:=False;
+End;
+
+Procedure MI_Disconnect;
+Begin
+ MI1:=UnAssigned;
+ MI2:=UnAssigned;
+ MI3:=UnAssigned;
+End;
+
+end.