diff --git a/src/Acornima/Parser.cs b/src/Acornima/Parser.cs index 0df4bf7..fdd8278 100644 --- a/src/Acornima/Parser.cs +++ b/src/Acornima/Parser.cs @@ -26,6 +26,8 @@ public Parser(ParserOptions options) _isReservedWord = _isReservedWordBind = null!; } + public ParserOptions Options => _options; + [MethodImpl(MethodImplOptions.AggressiveInlining)] public Script ParseScript(string input, string? sourceFile = null, bool strict = false) { diff --git a/src/Acornima/Tokenizer.cs b/src/Acornima/Tokenizer.cs index 6e4a8e8..d30c490 100644 --- a/src/Acornima/Tokenizer.cs +++ b/src/Acornima/Tokenizer.cs @@ -42,6 +42,13 @@ public Tokenizer(string input, int start, int length, SourceType sourceType, str Reset(input, start, length, sourceType, sourceFile); } + public string Input => _input; + public Range Range => new Range(_startPosition, _endPosition); + public SourceType SourceType => _sourceType; + public string? SourceFile => _sourceFile; + + public TokenizerOptions Options => _options; + public Token Current { [MethodImpl(MethodImplOptions.AggressiveInlining)]