mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-09 21:09:29 +02:00
pas2js: fixed handlign error on first token of used unit
git-svn-id: trunk@37782 -
This commit is contained in:
parent
6f1e770887
commit
e00e7d9cfd
@ -934,8 +934,6 @@ begin
|
||||
Log.LogRaw('Pas-Module:');
|
||||
Log.LogRaw(PasModule.GetDeclaration(true));
|
||||
end;
|
||||
if PasModule.CustomData=nil then
|
||||
PasModule.CustomData:=Self;
|
||||
|
||||
// analyze
|
||||
UseAnalyzer.AnalyzeModule(FPasModule);
|
||||
@ -970,14 +968,18 @@ begin
|
||||
Parser.ParseMain(FPasModule)
|
||||
else
|
||||
Parser.ParseSubModule(FPasModule);
|
||||
if PasModule.CustomData=nil then
|
||||
PasModule.CustomData:=Self;
|
||||
if (FPasModule.ImplementationSection<>nil)
|
||||
and (FPasModule.ImplementationSection.PendingUsedIntf<>nil) then
|
||||
exit;
|
||||
ParserFinished;
|
||||
except
|
||||
on E: Exception do
|
||||
HandleException(E);
|
||||
end;
|
||||
if (FPasModule.ImplementationSection<>nil)
|
||||
and (FPasModule.ImplementationSection.PendingUsedIntf<>nil) then
|
||||
exit;
|
||||
ParserFinished;
|
||||
if (PasModule<>nil) and (PasModule.CustomData=nil) then
|
||||
PasModule.CustomData:=Self;
|
||||
end;
|
||||
|
||||
procedure TPas2jsCompilerFile.CreateJS;
|
||||
|
@ -126,7 +126,7 @@ begin
|
||||
tkLibrary:
|
||||
ParseLibrary(Module);
|
||||
else
|
||||
ExpectToken(tkUnit);
|
||||
CheckToken(tkUnit);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user