Versions in this module Expand all Collapse all v0 v0.0.1 Mar 15, 2025 Changes in this version + func ComputeLineOfPosition(lineStarts []core.TextPos, pos int) int + func ComputePositionOfLineAndCharacter(lineStarts []core.TextPos, line int, character int) int + func DeclarationNameToString(name *ast.Node) string + func GetEndLinePosition(sourceFile *ast.SourceFile, line int) int + func GetIdentifierToken(str string) ast.Kind + func GetLeadingCommentRanges(f *ast.NodeFactory, text string, pos int) iter.Seq[ast.CommentRange] + func GetLineAndCharacterOfPosition(sourceFile *ast.SourceFile, pos int) (line int, character int) + func GetLineStarts(sourceFile *ast.SourceFile) []core.TextPos + func GetPositionOfLineAndCharacter(sourceFile *ast.SourceFile, line int, character int) int + func GetRangeOfTokenAtPosition(sourceFile *ast.SourceFile, pos int) core.TextRange + func GetSourceTextOfNodeFromSourceFile(sourceFile *ast.SourceFile, node *ast.Node, includeTrivia bool) string + func GetTextOfNode(node *ast.Node) string + func GetTextOfNodeFromSourceText(sourceText string, node *ast.Node, includeTrivia bool) string + func GetTokenPosOfNode(node *ast.Node, sourceFile *ast.SourceFile, includeJsDoc bool) int + func GetTrailingCommentRanges(f *ast.NodeFactory, text string, pos int) iter.Seq[ast.CommentRange] + func IdentifierToKeywordKind(node *ast.Identifier) ast.Kind + func IsIdentifierText(name string, languageVersion core.ScriptTarget) bool + func IsValidIdentifier(s string, languageVersion core.ScriptTarget) bool + func ScanTokenAtPosition(sourceFile *ast.SourceFile, pos int) ast.Kind + func SkipTrivia(text string, pos int) int + func SkipTriviaEx(text string, pos int, options *SkipTriviaOptions) int + func TokenToString(token ast.Kind) string + type ErrorCallback func(diagnostic *diagnostics.Message, start, length int, args ...any) + type EscapeSequenceScanningFlags int32 + const EscapeSequenceScanningFlagsAllowExtendedUnicodeEscape + const EscapeSequenceScanningFlagsAnnexB + const EscapeSequenceScanningFlagsAnyUnicodeMode + const EscapeSequenceScanningFlagsAtomEscape + const EscapeSequenceScanningFlagsRegularExpression + const EscapeSequenceScanningFlagsReportErrors + const EscapeSequenceScanningFlagsReportInvalidEscapeErrors + const EscapeSequenceScanningFlagsString + type JSDocParsingMode int + const JSDocParsingModeParseAll + const JSDocParsingModeParseForTypeErrors + const JSDocParsingModeParseForTypeInfo + const JSDocParsingModeParseNone + type Scanner struct + JSDocParsingMode JSDocParsingMode + func GetScannerForSourceFile(sourceFile *ast.SourceFile, pos int) *Scanner + func NewScanner() *Scanner + func (s *Scanner) CommentDirectives() []ast.CommentDirective + func (s *Scanner) HasExtendedUnicodeEscape() bool + func (s *Scanner) HasPrecedingJSDocComment() bool + func (s *Scanner) HasPrecedingJSDocLeadingAsterisks() bool + func (s *Scanner) HasPrecedingLineBreak() bool + func (s *Scanner) HasUnicodeEscape() bool + func (s *Scanner) Mark() ScannerState + func (s *Scanner) ReScanAsteriskEqualsToken() ast.Kind + func (s *Scanner) ReScanGreaterThanToken() ast.Kind + func (s *Scanner) ReScanHashToken() ast.Kind + func (s *Scanner) ReScanJsxAttributeValue() ast.Kind + func (s *Scanner) ReScanJsxToken(allowMultilineJsxText bool) ast.Kind + func (s *Scanner) ReScanLessThanToken() ast.Kind + func (s *Scanner) ReScanQuestionToken() ast.Kind + func (s *Scanner) ReScanSlashToken() ast.Kind + func (s *Scanner) ReScanTemplateToken(isTaggedTemplate bool) ast.Kind + func (s *Scanner) Reset() + func (s *Scanner) ResetPos(pos int) + func (s *Scanner) Rewind(state ScannerState) + func (s *Scanner) Scan() ast.Kind + func (s *Scanner) ScanJSDocCommentTextToken(inBackticks bool) ast.Kind + func (s *Scanner) ScanJSDocToken() ast.Kind + func (s *Scanner) ScanJsxAttributeValue() ast.Kind + func (s *Scanner) ScanJsxIdentifier() ast.Kind + func (s *Scanner) ScanJsxToken() ast.Kind + func (s *Scanner) ScanJsxTokenEx(allowMultilineJsxText bool) ast.Kind + func (s *Scanner) SetJSDocParsingMode(kind JSDocParsingMode) + func (s *Scanner) SetLanguageVariant(languageVariant core.LanguageVariant) + func (s *Scanner) SetOnError(errorCallback ErrorCallback) + func (s *Scanner) SetScriptKind(scriptKind core.ScriptKind) + func (s *Scanner) SetScriptTarget(scriptTarget core.ScriptTarget) + func (s *Scanner) SetText(text string) + func (s *Scanner) Text() string + func (s *Scanner) Token() ast.Kind + func (s *Scanner) TokenEnd() int + func (s *Scanner) TokenFlags() ast.TokenFlags + func (s *Scanner) TokenFullStart() int + func (s *Scanner) TokenRange() core.TextRange + func (s *Scanner) TokenStart() int + func (s *Scanner) TokenText() string + func (s *Scanner) TokenValue() string + func (scanner *Scanner) SetSkipJsDocLeadingAsterisks(skip bool) + type ScannerState struct + type SkipTriviaOptions struct + InJSDoc bool + StopAfterLineBreak bool + StopAtComments bool