Browse Source

fcl-passrc: resolver: check resourcestring expression

git-svn-id: trunk@37397 -
Mattias Gaertner 7 years ago
parent
commit
fe27ec2a26
2 changed files with 3 additions and 0 deletions
  1. 1 0
      packages/fcl-passrc/src/pasresolver.pp
  2. 2 0
      packages/fcl-passrc/src/pparser.pp

+ 1 - 0
packages/fcl-passrc/src/pasresolver.pp

@@ -9968,6 +9968,7 @@ begin
   stTypeSection: FinishTypeSection(El as TPasDeclarations);
   stTypeDef: FinishTypeDef(El as TPasType);
   stConstDef: FinishConstDef(El as TPasConst);
+  stResourceString: FinishResourcestring(El as TPasResString);
   stProcedure: FinishProcedure(El as TPasProcedure);
   stProcedureHeader: FinishProcedureType(El as TPasProcedureType);
   stExceptOnExpr: FinishExceptOnExpr;

+ 2 - 0
packages/fcl-passrc/src/pparser.pp

@@ -144,6 +144,7 @@ type
     stTypeSection,
     stTypeDef, // e.g. a TPasType
     stConstDef, // e.g. a TPasConst
+    stResourceString, // e.g. TPasResString
     stProcedure, // also method, procedure, constructor, destructor, ...
     stProcedureHeader,
     stExceptOnExpr,
@@ -3053,6 +3054,7 @@ begin
                 ResStrEl := ParseResourcestringDecl(Declarations);
                 Declarations.Declarations.Add(ResStrEl);
                 Declarations.ResStrings.Add(ResStrEl);
+                Engine.FinishScope(stResourceString,ResStrEl);
               end;
             declType:
               begin