Skip to content

Commit d834b38

Browse files
committed
Add missing Issue methods, update changelog
1 parent a88398f commit d834b38

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
All notable changes to this project from version 0.4.0 upwards are documented in this file.
33
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
44

5+
## [0.9.1] – Not yet released
6+
7+
### Added
8+
- Include the source in ANTLR parse errors, if available
9+
- Missing `lexical` and `syntactic` methods in `Issue`
10+
11+
### Fixed
12+
- `Position`'s printed representation
13+
514
## [0.9.0] – 2025-07-23
615

716
### Added

pylasu/validation/validation.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ def __str__(self):
3030
msg += f" @ {self.position}"
3131
return msg
3232

33+
@staticmethod
34+
def lexical(message: str, severity: IssueSeverity = IssueSeverity.ERROR, position: Position = None):
35+
return Issue(IssueType.LEXICAL, message, severity, position)
36+
37+
@staticmethod
38+
def syntactic(message: str, severity: IssueSeverity = IssueSeverity.ERROR, position: Position = None):
39+
return Issue(IssueType.SYNTACTIC, message, severity, position)
40+
3341
@staticmethod
3442
def semantic(message: str, severity: IssueSeverity = IssueSeverity.ERROR, position: Position = None):
3543
return Issue(IssueType.SEMANTIC, message, severity, position)

0 commit comments

Comments
 (0)