fix BOM issue parsing FML

This commit is contained in:
Grahame Grieve 2024-01-17 22:21:27 +11:00
parent fddd55f4be
commit 8a8a13182d
1 changed files with 4 additions and 4 deletions

View File

@ -58,26 +58,26 @@ public class FHIRLexer {
private boolean allowDoubleQuotes;
public FHIRLexer(String source, String name) throws FHIRLexerException {
this.source = source == null ? "" : source;
this.source = source == null ? "" : Utilities.stripBOM(source);
this.name = name == null ? "??" : name;
currentLocation = new SourceLocation(1, 1);
next();
}
public FHIRLexer(String source, int i) throws FHIRLexerException {
this.source = source;
this.source = Utilities.stripBOM(source);
this.cursor = i;
currentLocation = new SourceLocation(1, 1);
next();
}
public FHIRLexer(String source, int i, boolean allowDoubleQuotes) throws FHIRLexerException {
this.source = source;
this.source = Utilities.stripBOM(source);
this.cursor = i;
this.allowDoubleQuotes = allowDoubleQuotes;
currentLocation = new SourceLocation(1, 1);
next();
}
public FHIRLexer(String source, String name, boolean metadataFormat, boolean allowDoubleQuotes) throws FHIRLexerException {
this.source = source == null ? "" : source;
this.source = source == null ? "" : Utilities.stripBOM(source);
this.name = name == null ? "??" : name;
this.metadataFormat = metadataFormat;
this.allowDoubleQuotes = allowDoubleQuotes;