Skip to content

Commit f2d46cf

Browse files
cirrasfourls
authored andcommitted
Handle name references properly within exports sections
1 parent ca66bd0 commit f2d46cf

File tree

4 files changed

+23
-1
lines changed

4 files changed

+23
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
- Parsing errors on qualified name references within `exports` sections.
13+
1014
## [1.18.1] - 2025-08-07
1115

1216
### Added

delphi-frontend/src/main/antlr3/au/com/integradev/delphi/antlr/Delphi.g

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ arrayVarValueSpec : ABSOLUTE expression
558558
varValueSpec : ABSOLUTE expression
559559
| '=' constExpression
560560
;
561-
exportsSection : EXPORTS ident exportItem (',' ident exportItem)* ';'
561+
exportsSection : EXPORTS nameReference exportItem (',' nameReference exportItem)* ';'
562562
;
563563
exportItem : ('(' formalParameterList ')')? (INDEX expression)? (NAME expression)? (RESIDENT)?
564564
;

delphi-frontend/src/test/java/au/com/integradev/delphi/antlr/GrammarTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,4 +360,9 @@ void testSemicolonSeparatedGenericArguments() {
360360
void testGreaterThanEqualAmbiguity() {
361361
assertParsed("GreaterThanEqualAmbiguity.pas");
362362
}
363+
364+
@Test
365+
void testQualifiedExports() {
366+
assertParsed("QualifiedExports.dpk");
367+
}
363368
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
library QualifiedExports;
2+
3+
procedure Foo; stdcall;
4+
begin
5+
// ...
6+
end;
7+
8+
exports
9+
QualifiedExports.Foo;
10+
11+
begin
12+
// ...
13+
end.

0 commit comments

Comments
 (0)