Browse Source

fcl-passrc: fixed parent of const external modifier

git-svn-id: trunk@41496 -
Mattias Gaertner 6 years ago
parent
commit
463e98ccef
2 changed files with 2 additions and 1 deletions
  1. 1 1
      packages/fcl-passrc/src/pparser.pp
  2. 1 0
      packages/pastojs/tests/tcfiler.pas

+ 1 - 1
packages/fcl-passrc/src/pparser.pp

@@ -3909,7 +3909,7 @@ begin
             NextToken;
             if not (CurToken in [tkChar,tkString,tkIdentifier]) then
               ParseExcTokenError(TokenInfos[tkString]);
-            Result.ExportName:=DoParseExpression(Parent);
+            Result.ExportName:=DoParseExpression(Result);
             Result.IsConst:=true; // external const is readonly
             end
           else if CurToken=tkSemicolon then

+ 1 - 0
packages/pastojs/tests/tcfiler.pas

@@ -1646,6 +1646,7 @@ begin
   '  s = ''abc'';', // string lit
   '  c: char = s[1];', // array params
   '  a: array[1..2] of longint = (3,4);', // anonymous array, range, array values
+  '  PI: Double; external name ''Math.PI'';',
   'resourcestring',
   '  rs = ''rs'';',
   'implementation']);