diff --git a/internal/astnav/tokens_test.go b/internal/astnav/tokens_test.go index 671f92280b1..285e69f9b0b 100644 --- a/internal/astnav/tokens_test.go +++ b/internal/astnav/tokens_test.go @@ -300,10 +300,10 @@ func writeRangeDiff(output *strings.Builder, file *ast.SourceFile, diff tokenDif goTokenPos = diff.goToken.Pos goTokenEnd = diff.goToken.End } - tsStartLine, _ := core.PositionToLineAndCharacter(tsTokenPos, lines) - tsEndLine, _ := core.PositionToLineAndCharacter(tsTokenEnd, lines) - goStartLine, _ := core.PositionToLineAndCharacter(goTokenPos, lines) - goEndLine, _ := core.PositionToLineAndCharacter(goTokenEnd, lines) + tsStartLine, _ := core.PositionToLineAndByteOffset(tsTokenPos, lines) + tsEndLine, _ := core.PositionToLineAndByteOffset(tsTokenEnd, lines) + goStartLine, _ := core.PositionToLineAndByteOffset(goTokenPos, lines) + goEndLine, _ := core.PositionToLineAndByteOffset(goTokenEnd, lines) contextLines := 2 startLine := min(tsStartLine, goStartLine) diff --git a/internal/checker/printer.go b/internal/checker/printer.go index b6a2408f747..715771f8e5e 100644 --- a/internal/checker/printer.go +++ b/internal/checker/printer.go @@ -49,7 +49,7 @@ func (s *semicolonRemoverWriter) DecreaseIndent() { s.inner.DecreaseIndent() } -func (s *semicolonRemoverWriter) GetColumn() int { +func (s *semicolonRemoverWriter) GetColumn() core.UTF16Offset { return s.inner.GetColumn() } diff --git a/internal/compiler/emit_test.go b/internal/compiler/emit_test.go index e0682e91fbe..7a97c03a8ef 100644 --- a/internal/compiler/emit_test.go +++ b/internal/compiler/emit_test.go @@ -16,7 +16,7 @@ import ( // generateLongLineTS generates TypeScript source code that produces a single very long line. // This simulates generated code (e.g., from code generators) that has no line breaks, // which triggers O(nΒ²) behavior in source map generation due to -// GetECMALineAndCharacterOfPosition scanning from line start for each position. +// GetECMALineAndUTF16CharacterOfPosition scanning from line start for each position. func generateLongLineTS(numProperties int) string { // Build a large object literal all on one line, with no line breaks. var b strings.Builder diff --git a/internal/core/core.go b/internal/core/core.go index aa553ee3963..294944cf95b 100644 --- a/internal/core/core.go +++ b/internal/core/core.go @@ -9,6 +9,7 @@ import ( "strings" "sync" "unicode" + "unicode/utf16" "unicode/utf8" "github.com/microsoft/typescript-go/internal/debug" @@ -440,13 +441,37 @@ func ComputeECMALineStartsSeq(text string) iter.Seq[TextPos] { } } -func PositionToLineAndCharacter(position int, lineStarts []TextPos) (line int, character int) { +// PositionToLineAndByteOffset returns the 0-based line and byte offset from the +// start of that line for the given byte position, using the provided line starts. +// The byte offset is a raw UTF-8 byte offset from the line start, not a UTF-16 code unit count. +func PositionToLineAndByteOffset(position int, lineStarts []TextPos) (line int, byteOffset int) { line = max(sort.Search(len(lineStarts), func(i int) bool { return int(lineStarts[i]) > position })-1, 0) return line, position - int(lineStarts[line]) } +// UTF16Offset represents a character offset measured in UTF-16 code units. +type UTF16Offset int + +// UTF16Len returns the number of UTF-16 code units needed to +// represent the given UTF-8 encoded string. +func UTF16Len(s string) UTF16Offset { + // Fast path: scan for non-ASCII bytes. For ASCII-only strings, + // each byte is one UTF-16 code unit, so we can return len(s) directly. + for i := range len(s) { + if s[i] >= utf8.RuneSelf { + // Found non-ASCII; count the ASCII prefix, then decode the rest. + n := UTF16Offset(i) + for _, r := range s[i:] { + n += UTF16Offset(utf16.RuneLen(r)) + } + return n + } + } + return UTF16Offset(len(s)) +} + func Flatten[T any](array [][]T) []T { var result []T for _, subArray := range array { diff --git a/internal/diagnosticwriter/diagnosticwriter.go b/internal/diagnosticwriter/diagnosticwriter.go index 2ac8c2e2687..215994f0fc9 100644 --- a/internal/diagnosticwriter/diagnosticwriter.go +++ b/internal/diagnosticwriter/diagnosticwriter.go @@ -167,8 +167,8 @@ func FormatDiagnosticWithColorAndContext(output io.Writer, diagnostic Diagnostic } func writeCodeSnippet(writer io.Writer, sourceFile FileLike, start int, length int, squiggleColor string, indent string, formatOpts *FormattingOptions) { - firstLine, firstLineChar := scanner.GetECMALineAndCharacterOfPosition(sourceFile, start) - lastLine, lastLineChar := scanner.GetECMALineAndCharacterOfPosition(sourceFile, start+length) + firstLine, firstLineChar := scanner.GetECMALineAndUTF16CharacterOfPosition(sourceFile, start) + lastLine, lastLineChar := scanner.GetECMALineAndUTF16CharacterOfPosition(sourceFile, start+length) if length == 0 { lastLineChar++ // When length is zero, squiggle the character right after the start position. } @@ -196,10 +196,10 @@ func writeCodeSnippet(writer io.Writer, sourceFile FileLike, start int, length i i = lastLine - 1 } - lineStart := scanner.GetECMAPositionOfLineAndCharacter(sourceFile, i, 0) + lineStart := scanner.GetECMAPositionOfLineAndByteOffset(sourceFile, i, 0) var lineEnd int if i < lastLineOfFile { - lineEnd = scanner.GetECMAPositionOfLineAndCharacter(sourceFile, i+1, 0) + lineEnd = scanner.GetECMAPositionOfLineAndByteOffset(sourceFile, i+1, 0) } else { lineEnd = len(sourceFile.Text()) } @@ -229,21 +229,21 @@ func writeCodeSnippet(writer io.Writer, sourceFile FileLike, start int, length i // Otherwise, we'll just squiggle the rest of the line, giving 'slice' no end position. var lastCharForLine int if i == lastLine { - lastCharForLine = lastLineChar + lastCharForLine = int(lastLineChar) } else { - lastCharForLine = len(lineContent) + lastCharForLine = int(core.UTF16Len(lineContent)) } // Fill with spaces until the first character, // then squiggle the remainder of the line. - fmt.Fprint(writer, strings.Repeat(" ", firstLineChar)) - fmt.Fprint(writer, strings.Repeat("~", lastCharForLine-firstLineChar)) + fmt.Fprint(writer, strings.Repeat(" ", int(firstLineChar))) + fmt.Fprint(writer, strings.Repeat("~", lastCharForLine-int(firstLineChar))) case lastLine: // Squiggle until the final character. - fmt.Fprint(writer, strings.Repeat("~", lastLineChar)) + fmt.Fprint(writer, strings.Repeat("~", int(lastLineChar))) default: // Squiggle the entire line. - fmt.Fprint(writer, strings.Repeat("~", len(lineContent))) + fmt.Fprint(writer, strings.Repeat("~", int(core.UTF16Len(lineContent)))) } fmt.Fprint(writer, resetEscapeSequence) @@ -303,7 +303,7 @@ func writeWithStyleAndReset(output io.Writer, text string, formatStyle string) { } func WriteLocation(output io.Writer, file FileLike, pos int, formatOpts *FormattingOptions, writeWithStyleAndReset FormattedWriter) { - firstLine, firstChar := scanner.GetECMALineAndCharacterOfPosition(file, pos) + firstLine, firstChar := scanner.GetECMALineAndUTF16CharacterOfPosition(file, pos) var relativeFileName string if formatOpts != nil { relativeFileName = tspath.ConvertToRelativePath(file.FileName(), formatOpts.ComparePathsOptions) @@ -315,7 +315,7 @@ func WriteLocation(output io.Writer, file FileLike, pos int, formatOpts *Formatt fmt.Fprint(output, ":") writeWithStyleAndReset(output, strconv.Itoa(firstLine+1), foregroundColorEscapeYellow) fmt.Fprint(output, ":") - writeWithStyleAndReset(output, strconv.Itoa(firstChar+1), foregroundColorEscapeYellow) + writeWithStyleAndReset(output, strconv.Itoa(int(firstChar)+1), foregroundColorEscapeYellow) } // Some of these lived in watch.ts, but they're not specific to the watch API. @@ -465,10 +465,10 @@ func WriteFormatDiagnostics(output io.Writer, diagnostics []Diagnostic, formatOp func WriteFormatDiagnostic(output io.Writer, diagnostic Diagnostic, formatOpts *FormattingOptions) { if diagnostic.File() != nil { - line, character := scanner.GetECMALineAndCharacterOfPosition(diagnostic.File(), diagnostic.Pos()) + line, character := scanner.GetECMALineAndUTF16CharacterOfPosition(diagnostic.File(), diagnostic.Pos()) fileName := diagnostic.File().FileName() relativeFileName := tspath.ConvertToRelativePath(fileName, formatOpts.ComparePathsOptions) - fmt.Fprintf(output, "%s(%d,%d): ", relativeFileName, line+1, character+1) + fmt.Fprintf(output, "%s(%d,%d): ", relativeFileName, line+1, int(character)+1) } fmt.Fprintf(output, "%s TS%d: ", diagnostic.Category().Name(), diagnostic.Code()) diff --git a/internal/format/indent.go b/internal/format/indent.go index 2ac6c4d8b0f..9020a56eccd 100644 --- a/internal/format/indent.go +++ b/internal/format/indent.go @@ -14,7 +14,7 @@ import ( ) func GetIndentationForNode(n *ast.Node, ignoreActualIndentationRange *core.TextRange, sourceFile *ast.SourceFile, options *lsutil.FormatCodeSettings) int { - startline, startpos := scanner.GetECMALineAndCharacterOfPosition(sourceFile, scanner.GetTokenPosOfNode(n, sourceFile, false)) + startline, startpos := scanner.GetECMALineAndByteOffsetOfPosition(sourceFile, scanner.GetTokenPosOfNode(n, sourceFile, false)) return getIndentationForNodeWorker(n, startline, startpos, ignoreActualIndentationRange /*indentationDelta*/, 0, sourceFile /*isNextChild*/, false, options) } @@ -104,7 +104,7 @@ func getIndentationForNodeWorker( parent = current.Parent if useTrueStart { - currentStartLine, currentStartCharacter = scanner.GetECMALineAndCharacterOfPosition(sourceFile, scanner.GetTokenPosOfNode(current, sourceFile, false)) + currentStartLine, currentStartCharacter = scanner.GetECMALineAndByteOffsetOfPosition(sourceFile, scanner.GetTokenPosOfNode(current, sourceFile, false)) } else { currentStartLine = containingListOrParentStartLine currentStartCharacter = containingListOrParentStartCharacter @@ -170,7 +170,7 @@ func getActualIndentationForListStartLine(list *ast.NodeList, sourceFile *ast.So if list == nil { return -1 } - line, char := scanner.GetECMALineAndCharacterOfPosition(sourceFile, list.Loc.Pos()) + line, char := scanner.GetECMALineAndByteOffsetOfPosition(sourceFile, list.Loc.Pos()) return findColumnForFirstNonWhitespaceCharacterInLine(line, char, sourceFile, options) } @@ -200,7 +200,7 @@ func deriveActualIndentationFromList(list *ast.NodeList, index int, sourceFile * } func findColumnForFirstNonWhitespaceCharacterInLine(line int, char int, sourceFile *ast.SourceFile, options *lsutil.FormatCodeSettings) int { - lineStart := scanner.GetECMAPositionOfLineAndCharacter(sourceFile, line, 0) + lineStart := scanner.GetECMAPositionOfLineAndByteOffset(sourceFile, line, 0) return FindFirstNonWhitespaceColumn(lineStart, lineStart+char, sourceFile, options) } @@ -217,14 +217,11 @@ func FindFirstNonWhitespaceColumn(startPos int, endPos int, sourceFile *ast.Sour * value of 'column' for '$' is 6 (assuming that tab size is 4) */ func findFirstNonWhitespaceCharacterAndColumn(startPos int, endPos int, sourceFile *ast.SourceFile, options *lsutil.FormatCodeSettings) (character int, column int) { - character = 0 column = 0 text := sourceFile.Text() - for pos := startPos; pos < endPos; pos++ { + pos := startPos + for pos < endPos { ch, size := utf8.DecodeRuneInString(text[pos:]) - if size == 0 && ch == utf8.RuneError { - continue // multibyte character - TODO: recognize non-tab multicolumn characters? ideographic space? - } if !stringutil.IsWhiteSpaceSingleLine(ch) { break } @@ -235,9 +232,9 @@ func findFirstNonWhitespaceCharacterAndColumn(startPos int, endPos int, sourceFi column++ } - character++ + pos += size } - return character, column + return pos - startPos, column } func childStartsOnTheSameLineWithElseInIfStatement(parent *ast.Node, child *ast.Node, childStartLine int, sourceFile *ast.SourceFile) bool { @@ -251,7 +248,7 @@ func childStartsOnTheSameLineWithElseInIfStatement(parent *ast.Node, child *ast. } func getStartLineAndCharacterForNode(n *ast.Node, sourceFile *ast.SourceFile) (line int, character int) { - return scanner.GetECMALineAndCharacterOfPosition(sourceFile, scanner.GetTokenPosOfNode(n, sourceFile, false)) + return scanner.GetECMALineAndByteOffsetOfPosition(sourceFile, scanner.GetTokenPosOfNode(n, sourceFile, false)) } func getStartLineForNode(n *ast.Node, sourceFile *ast.SourceFile) int { @@ -361,7 +358,7 @@ func getContainingListOrParentStart(parent *ast.Node, child *ast.Node, sourceFil } else { startPos = scanner.GetTokenPosOfNode(parent, sourceFile, false) } - return scanner.GetECMALineAndCharacterOfPosition(sourceFile, startPos) + return scanner.GetECMALineAndByteOffsetOfPosition(sourceFile, startPos) } func isControlFlowEndingStatement(kind ast.Kind, parentKind ast.Kind) bool { diff --git a/internal/format/span.go b/internal/format/span.go index ad3df2805fe..44153f9ec83 100644 --- a/internal/format/span.go +++ b/internal/format/span.go @@ -264,7 +264,7 @@ func (w *formatSpanWorker) execute(s *formattingScanner) []core.TextChange { } w.indentTriviaItems(remainingTrivia, indentation, true, func(item TextRangeWithKind) { - startLine, startChar := scanner.GetECMALineAndCharacterOfPosition(w.sourceFile, item.Loc.Pos()) + startLine, startChar := scanner.GetECMALineAndByteOffsetOfPosition(w.sourceFile, item.Loc.Pos()) w.processRange(item, startLine, startChar, w.enclosingNode, w.enclosingNode, nil) w.insertIndentation(item.Loc.Pos(), indentation, false) }) @@ -770,7 +770,7 @@ func (w *formatSpanWorker) processRange(r TextRangeWithKind, rangeStartLine int, func (w *formatSpanWorker) processTrivia(trivia []TextRangeWithKind, parent *ast.Node, contextNode *ast.Node, dynamicIndentation *dynamicIndenter) { for _, triviaItem := range trivia { if isComment(triviaItem.Kind) && triviaItem.Loc.ContainedBy(w.originalRange) { - triviaItemStartLine, triviaItemStartCharacter := scanner.GetECMALineAndCharacterOfPosition(w.sourceFile, triviaItem.Loc.Pos()) + triviaItemStartLine, triviaItemStartCharacter := scanner.GetECMALineAndByteOffsetOfPosition(w.sourceFile, triviaItem.Loc.Pos()) w.processRange(triviaItem, triviaItemStartLine, triviaItemStartCharacter, parent, contextNode, dynamicIndentation) } } @@ -867,7 +867,7 @@ func (w *formatSpanWorker) insertIndentation(pos int, indentation int, lineAdded // insert indentation string at the very beginning of the token w.recordReplace(pos, 0, indentationString) } else { - tokenStartLine, tokenStartCharacter := scanner.GetECMALineAndCharacterOfPosition(w.sourceFile, pos) + tokenStartLine, tokenStartCharacter := scanner.GetECMALineAndByteOffsetOfPosition(w.sourceFile, pos) startLinePosition := int(scanner.GetECMALineStarts(w.sourceFile)[tokenStartLine]) if indentation != w.characterToColumn(startLinePosition, tokenStartCharacter) || w.indentationIsDifferent(indentationString, startLinePosition) { w.recordReplace(startLinePosition, tokenStartCharacter, indentationString) @@ -1026,7 +1026,7 @@ func (w *formatSpanWorker) consumeTokenAndAdvanceScanner(currentTokenInfo tokenI lineAction := LineActionNone isTokenInRange := currentTokenInfo.token.Loc.ContainedBy(w.originalRange) - tokenStartLine, tokenStartChar := scanner.GetECMALineAndCharacterOfPosition(w.sourceFile, currentTokenInfo.token.Loc.Pos()) + tokenStartLine, tokenStartChar := scanner.GetECMALineAndByteOffsetOfPosition(w.sourceFile, currentTokenInfo.token.Loc.Pos()) if isTokenInRange { rangeHasError := w.rangeContainsError(currentTokenInfo.token.Loc) diff --git a/internal/printer/changetrackerwriter.go b/internal/printer/changetrackerwriter.go index 720272c9597..9e365030e22 100644 --- a/internal/printer/changetrackerwriter.go +++ b/internal/printer/changetrackerwriter.go @@ -224,12 +224,12 @@ func (ct *ChangeTrackerWriter) WriteLiteral(s string) { ct.textWriter.WriteLiteral(s) ct.setLastNonTriviaPosition(s, true) } -func (ct *ChangeTrackerWriter) GetTextPos() int { return ct.textWriter.GetTextPos() } -func (ct *ChangeTrackerWriter) GetLine() int { return ct.textWriter.GetLine() } -func (ct *ChangeTrackerWriter) GetColumn() int { return ct.textWriter.GetColumn() } -func (ct *ChangeTrackerWriter) GetIndent() int { return ct.textWriter.GetIndent() } -func (ct *ChangeTrackerWriter) IsAtStartOfLine() bool { return ct.textWriter.IsAtStartOfLine() } -func (ct *ChangeTrackerWriter) HasTrailingComment() bool { return ct.textWriter.HasTrailingComment() } +func (ct *ChangeTrackerWriter) GetTextPos() int { return ct.textWriter.GetTextPos() } +func (ct *ChangeTrackerWriter) GetLine() int { return ct.textWriter.GetLine() } +func (ct *ChangeTrackerWriter) GetColumn() core.UTF16Offset { return ct.textWriter.GetColumn() } +func (ct *ChangeTrackerWriter) GetIndent() int { return ct.textWriter.GetIndent() } +func (ct *ChangeTrackerWriter) IsAtStartOfLine() bool { return ct.textWriter.IsAtStartOfLine() } +func (ct *ChangeTrackerWriter) HasTrailingComment() bool { return ct.textWriter.HasTrailingComment() } func (ct *ChangeTrackerWriter) HasTrailingWhitespace() bool { return ct.textWriter.HasTrailingWhitespace() } diff --git a/internal/printer/emittextwriter.go b/internal/printer/emittextwriter.go index a66117bdb57..133328dbe2c 100644 --- a/internal/printer/emittextwriter.go +++ b/internal/printer/emittextwriter.go @@ -1,6 +1,9 @@ package printer -import "github.com/microsoft/typescript-go/internal/ast" +import ( + "github.com/microsoft/typescript-go/internal/ast" + "github.com/microsoft/typescript-go/internal/core" +) // Externally opaque interface for printing text type EmitTextWriter interface { @@ -25,7 +28,7 @@ type EmitTextWriter interface { WriteLiteral(s string) GetTextPos() int GetLine() int - GetColumn() int + GetColumn() core.UTF16Offset GetIndent() int IsAtStartOfLine() bool HasTrailingComment() bool diff --git a/internal/printer/singlelinestringwriter.go b/internal/printer/singlelinestringwriter.go index 2b7241eec1d..95bccea6145 100644 --- a/internal/printer/singlelinestringwriter.go +++ b/internal/printer/singlelinestringwriter.go @@ -6,6 +6,7 @@ import ( "unicode/utf8" "github.com/microsoft/typescript-go/internal/ast" + "github.com/microsoft/typescript-go/internal/core" "github.com/microsoft/typescript-go/internal/stringutil" ) @@ -39,7 +40,7 @@ func (w singleLineStringWriter) DecreaseIndent() { // Do Nothing } -func (w singleLineStringWriter) GetColumn() int { +func (w singleLineStringWriter) GetColumn() core.UTF16Offset { return 0 } diff --git a/internal/printer/textwriter.go b/internal/printer/textwriter.go index a1b92b53020..94c43a76bed 100644 --- a/internal/printer/textwriter.go +++ b/internal/printer/textwriter.go @@ -31,11 +31,15 @@ func (w *textWriter) DecreaseIndent() { w.indent-- } -func (w *textWriter) GetColumn() int { +// GetColumn returns the column position measured in UTF-16 code units +// for source map compatibility. +func (w *textWriter) GetColumn() core.UTF16Offset { if w.lineStart { - return w.indent * w.indentSize + return core.UTF16Offset(w.indent * w.indentSize) } - return w.builder.Len() - w.linePos + // Count UTF-16 code units from the last line start. + // For ASCII-only output (the common case), this equals the byte count. + return core.UTF16Len(w.builder.String()[w.linePos:]) } func (w *textWriter) GetIndent() int { diff --git a/internal/printer/utilities.go b/internal/printer/utilities.go index 871e2d38515..94276552a7d 100644 --- a/internal/printer/utilities.go +++ b/internal/printer/utilities.go @@ -893,14 +893,16 @@ func calculateIndent(text string, pos int, end int) int { // optimized for monotonically increasing positions (e.g., during source map emit). // // When positions increase within the same line, only the delta between the last -// position and the new position needs to be scanned for rune counts, turning -// what would be O(nΒ²) into O(n) for long lines. +// position and the new position needs to be scanned for UTF-16 code unit counts, +// turning what would be O(nΒ²) into O(n) for long lines. +// +// Character offsets are measured in UTF-16 code units per the source map specification. type lineCharacterCache struct { lineMap []core.TextPos text string cachedLine int cachedPos int - cachedChar int + cachedChar core.UTF16Offset hasCached bool } @@ -911,15 +913,16 @@ func newLineCharacterCache(source sourcemap.Source) *lineCharacterCache { } } -func (c *lineCharacterCache) getLineAndCharacter(pos int) (line int, character int) { +// getLineAndCharacter returns the 0-based line number and UTF-16 code unit +// offset from the start of that line for the given byte position. +func (c *lineCharacterCache) getLineAndCharacter(pos int) (line int, character core.UTF16Offset) { line = scanner.ComputeLineOfPosition(c.lineMap, pos) if c.hasCached && line == c.cachedLine && pos >= c.cachedPos { - // Incremental: only count runes from the last cached position. - character = c.cachedChar + utf8.RuneCountInString(c.text[c.cachedPos:pos]) + // Incremental: only count UTF-16 code units from the last cached position. + character = c.cachedChar + core.UTF16Len(c.text[c.cachedPos:pos]) } else { // Full computation from line start. - // !!! TODO: this is suspect; these are rune counts, not UTF-8 _or_ UTF-16 offsets. - character = utf8.RuneCountInString(c.text[c.lineMap[line]:pos]) + character = core.UTF16Len(c.text[c.lineMap[line]:pos]) } c.cachedLine = line c.cachedPos = pos diff --git a/internal/scanner/scanner.go b/internal/scanner/scanner.go index c10e9ff8f1d..b9e035bb35c 100644 --- a/internal/scanner/scanner.go +++ b/internal/scanner/scanner.go @@ -7,6 +7,7 @@ import ( "strconv" "strings" "unicode" + "unicode/utf16" "unicode/utf8" "github.com/microsoft/typescript-go/internal/ast" @@ -2459,14 +2460,27 @@ func GetECMALineOfPosition(sourceFile ast.SourceFileLike, pos int) int { return ComputeLineOfPosition(lineMap, pos) } -func GetECMALineAndCharacterOfPosition(sourceFile ast.SourceFileLike, pos int) (line int, character int) { +// GetECMALineAndUTF16CharacterOfPosition returns the 0-based line number and the +// UTF-16 code unit offset from the start of that line for the given byte position. +// Uses ECMAScript line separators (LF, CR, CRLF, LS, PS). +func GetECMALineAndUTF16CharacterOfPosition(sourceFile ast.SourceFileLike, pos int) (line int, character core.UTF16Offset) { lineMap := GetECMALineStarts(sourceFile) line = ComputeLineOfPosition(lineMap, pos) - // !!! TODO: this is suspect; these are rune counts, not UTF-8 _or_ UTF-16 offsets. - character = utf8.RuneCountInString(sourceFile.Text()[lineMap[line]:pos]) + character = core.UTF16Len(sourceFile.Text()[lineMap[line]:pos]) return line, character } +// GetECMALineAndByteOffsetOfPosition returns the 0-based line number and the +// raw UTF-8 byte offset from the start of that line for the given byte position. +// Uses ECMAScript line separators (LF, CR, CRLF, LS, PS). +// Unlike GetECMALineAndUTF16CharacterOfPosition, the offset is in bytes, not UTF-16 code units. +func GetECMALineAndByteOffsetOfPosition(sourceFile ast.SourceFileLike, pos int) (line int, byteOffset int) { + lineMap := GetECMALineStarts(sourceFile) + line = ComputeLineOfPosition(lineMap, pos) + byteOffset = pos - int(lineMap[line]) + return line, byteOffset +} + func GetECMAEndLinePosition(sourceFile *ast.SourceFile, line int) int { pos := int(GetECMALineStarts(sourceFile)[line]) for { @@ -2478,15 +2492,35 @@ func GetECMAEndLinePosition(sourceFile *ast.SourceFile, line int) int { } } -func GetECMAPositionOfLineAndCharacter(sourceFile ast.SourceFileLike, line int, character int) int { - return ComputePositionOfLineAndCharacter(GetECMALineStarts(sourceFile), line, character) +// GetECMAPositionOfLineAndUTF16Character converts a 0-based line number and UTF-16 +// code unit character offset back to an absolute byte position in the source text. +// Uses ECMAScript line separators. +func GetECMAPositionOfLineAndUTF16Character(sourceFile ast.SourceFileLike, line int, character core.UTF16Offset) int { + lineStarts := GetECMALineStarts(sourceFile) + return ComputePositionOfLineAndUTF16Character(lineStarts, line, character, sourceFile.Text(), false) } -func ComputePositionOfLineAndCharacter(lineStarts []core.TextPos, line int, character int) int { - return ComputePositionOfLineAndCharacterEx(lineStarts, line, character, nil, false) +// GetECMAPositionOfLineAndByteOffset converts a 0-based line number and byte offset +// from line start back to an absolute byte position in the source text. +// Uses ECMAScript line separators. +func GetECMAPositionOfLineAndByteOffset(sourceFile ast.SourceFileLike, line int, byteOffset int) int { + return ComputePositionOfLineAndByteOffset(GetECMALineStarts(sourceFile), line, byteOffset) } -func ComputePositionOfLineAndCharacterEx(lineStarts []core.TextPos, line int, character int, text *string, allowEdits bool) int { +// ComputePositionOfLineAndByteOffset computes a byte position from a line and +// raw byte offset from the line start. This is a simple addition with validation. +func ComputePositionOfLineAndByteOffset(lineStarts []core.TextPos, line int, byteOffset int) int { + if line < 0 || line >= len(lineStarts) { + panic(fmt.Sprintf("Bad line number. Line: %d, lineStarts.length: %d.", line, len(lineStarts))) + } + return int(lineStarts[line]) + byteOffset +} + +// ComputePositionOfLineAndUTF16Character converts a line and UTF-16 character offset +// back to a byte position. The character parameter is measured in UTF-16 code units. +// It scans from the line start to correctly handle multi-byte characters. +// When allowEdits is true, out-of-range values are clamped instead of panicking. +func ComputePositionOfLineAndUTF16Character(lineStarts []core.TextPos, line int, character core.UTF16Offset, text string, allowEdits bool) int { if line < 0 || line >= len(lineStarts) { if allowEdits { // Clamp line to nearest allowable value @@ -2500,25 +2534,47 @@ func ComputePositionOfLineAndCharacterEx(lineStarts []core.TextPos, line int, ch } } - res := int(lineStarts[line]) + character + lineStart := int(lineStarts[line]) - if allowEdits { - // Clamp to nearest allowable values to allow the underlying to be edited without crashing (accuracy is lost, instead) - // TODO: Somehow track edits between file as it was during the creation of sourcemap we have and the current file and - // apply them to the computed position to improve accuracy - if line+1 < len(lineStarts) && res > int(lineStarts[line+1]) { - return int(lineStarts[line+1]) + if character > 0 { + // UTF-16 character offset: scan from line start counting UTF-16 code units. + lineEnd := len(text) + if line+1 < len(lineStarts) { + lineEnd = int(lineStarts[line+1]) + } + utf16Count := core.UTF16Offset(0) + pos := lineStart + for pos < lineEnd { + if utf16Count >= character { + break + } + r, size := utf8.DecodeRuneInString(text[pos:]) + utf16Count += core.UTF16Offset(utf16.RuneLen(r)) + pos += size + } + if !allowEdits { + if pos == lineEnd && utf16Count < character { + panic(fmt.Sprintf("Bad UTF-16 character offset. Line: %d, character: %d.", line, character)) + } + debug.Assert(pos <= len(text)) + return pos } - if text != nil && res > len(*text) { - return len(*text) + if pos > len(text) { + return len(text) } - return res + return pos } - if line < len(lineStarts)-1 && res >= int(lineStarts[line+1]) { - panic("Computed position is beyond that of the following line.") - } else if text != nil { - debug.Assert(res <= len(*text)) // Allow single character overflow for trailing newline + + // Character is 0: line start position. + res := lineStart + + if allowEdits { + if res > len(text) { + return len(text) + } + return res } + debug.Assert(res <= len(text)) // Allow single character overflow for trailing newline return res } diff --git a/internal/sourcemap/decoder.go b/internal/sourcemap/decoder.go index 8d2af14f61f..535ba2663d2 100644 --- a/internal/sourcemap/decoder.go +++ b/internal/sourcemap/decoder.go @@ -9,10 +9,10 @@ import ( type Mapping struct { GeneratedLine int - GeneratedCharacter int + GeneratedCharacter core.UTF16Offset SourceIndex SourceIndex SourceLine int - SourceCharacter int + SourceCharacter core.UTF16Offset NameIndex NameIndex } @@ -28,13 +28,14 @@ func (m *Mapping) Equals(other *Mapping) bool { func (m *Mapping) IsSourceMapping() bool { return m.SourceIndex != MissingSource && m.SourceLine != MissingLineOrColumn && - m.SourceCharacter != MissingLineOrColumn + m.SourceCharacter != MissingUTF16Column } const ( - MissingSource SourceIndex = -1 - MissingName NameIndex = -1 - MissingLineOrColumn int = -1 + MissingSource SourceIndex = -1 + MissingName NameIndex = -1 + MissingLineOrColumn int = -1 + MissingUTF16Column core.UTF16Offset = -1 ) type MappingsDecoder struct { @@ -42,10 +43,10 @@ type MappingsDecoder struct { done bool pos int generatedLine int - generatedCharacter int + generatedCharacter core.UTF16Offset sourceIndex SourceIndex sourceLine int - sourceCharacter int + sourceCharacter core.UTF16Offset nameIndex NameIndex error error mappingPool core.Pool[Mapping] @@ -100,7 +101,7 @@ func (d *MappingsDecoder) Next() (value *Mapping, done bool) { hasSource := false hasName := false - d.generatedCharacter += d.base64VLQFormatDecode() + d.generatedCharacter += core.UTF16Offset(d.base64VLQFormatDecode()) if d.hasReportedError() { return d.stopIterating() } @@ -133,7 +134,7 @@ func (d *MappingsDecoder) Next() (value *Mapping, done bool) { return d.setErrorAndStopIterating("Unsupported Format: No entries after sourceLine") } - d.sourceCharacter += d.base64VLQFormatDecode() + d.sourceCharacter += core.UTF16Offset(d.base64VLQFormatDecode()) if d.hasReportedError() { return d.stopIterating() } @@ -169,7 +170,7 @@ func (d *MappingsDecoder) captureMapping(hasSource bool, hasName bool) *Mapping mapping.GeneratedCharacter = d.generatedCharacter mapping.SourceIndex = core.IfElse(hasSource, d.sourceIndex, MissingSource) mapping.SourceLine = core.IfElse(hasSource, d.sourceLine, MissingLineOrColumn) - mapping.SourceCharacter = core.IfElse(hasSource, d.sourceCharacter, MissingLineOrColumn) + mapping.SourceCharacter = core.IfElse(hasSource, d.sourceCharacter, MissingUTF16Column) mapping.NameIndex = core.IfElse(hasName, d.nameIndex, MissingName) return mapping } diff --git a/internal/sourcemap/generator.go b/internal/sourcemap/generator.go index c73ca420900..4ac8bf5cb5f 100644 --- a/internal/sourcemap/generator.go +++ b/internal/sourcemap/generator.go @@ -5,6 +5,7 @@ import ( "slices" "strings" + "github.com/microsoft/typescript-go/internal/core" "github.com/microsoft/typescript-go/internal/json" "github.com/microsoft/typescript-go/internal/tspath" ) @@ -15,9 +16,10 @@ type ( ) const ( - sourceIndexNotSet SourceIndex = -1 - nameIndexNotSet NameIndex = -1 - notSet int = -1 + sourceIndexNotSet SourceIndex = -1 + nameIndexNotSet NameIndex = -1 + notSet int = -1 + notSetUTF16 core.UTF16Offset = -1 ) type Generator struct { @@ -33,17 +35,17 @@ type Generator struct { nameToNameIndexMap map[string]NameIndex mappings strings.Builder lastGeneratedLine int - lastGeneratedCharacter int + lastGeneratedCharacter core.UTF16Offset lastSourceIndex SourceIndex lastSourceLine int - lastSourceCharacter int + lastSourceCharacter core.UTF16Offset lastNameIndex NameIndex hasLast bool pendingGeneratedLine int - pendingGeneratedCharacter int + pendingGeneratedCharacter core.UTF16Offset pendingSourceIndex SourceIndex pendingSourceLine int - pendingSourceCharacter int + pendingSourceCharacter core.UTF16Offset pendingNameIndex NameIndex hasPending bool hasPendingSource bool @@ -120,16 +122,16 @@ func (gen *Generator) AddName(name string) NameIndex { return nameIndex } -func (gen *Generator) isNewGeneratedPosition(generatedLine int, generatedCharacter int) bool { +func (gen *Generator) isNewGeneratedPosition(generatedLine int, generatedCharacter core.UTF16Offset) bool { return !gen.hasPending || gen.pendingGeneratedLine != generatedLine || gen.pendingGeneratedCharacter != generatedCharacter } -func (gen *Generator) isBacktrackingSourcePosition(sourceIndex SourceIndex, sourceLine int, sourceCharacter int) bool { +func (gen *Generator) isBacktrackingSourcePosition(sourceIndex SourceIndex, sourceLine int, sourceCharacter core.UTF16Offset) bool { return sourceIndex != sourceIndexNotSet && sourceLine != notSet && - sourceCharacter != notSet && + sourceCharacter != notSetUTF16 && gen.pendingSourceIndex == sourceIndex && (gen.pendingSourceLine > sourceLine || gen.pendingSourceLine == sourceLine && gen.pendingSourceCharacter > sourceCharacter) @@ -205,7 +207,7 @@ func (gen *Generator) commitPendingMapping() { } // 1. Relative generated character - gen.appendBase64VLQ(gen.pendingGeneratedCharacter - gen.lastGeneratedCharacter) + gen.appendBase64VLQ(int(gen.pendingGeneratedCharacter - gen.lastGeneratedCharacter)) gen.lastGeneratedCharacter = gen.pendingGeneratedCharacter if gen.hasPendingSource { @@ -218,7 +220,7 @@ func (gen *Generator) commitPendingMapping() { gen.lastSourceLine = gen.pendingSourceLine // 4. Relative source character - gen.appendBase64VLQ(gen.pendingSourceCharacter - gen.lastSourceCharacter) + gen.appendBase64VLQ(int(gen.pendingSourceCharacter - gen.lastSourceCharacter)) gen.lastSourceCharacter = gen.pendingSourceCharacter if gen.hasPendingName { @@ -231,7 +233,7 @@ func (gen *Generator) commitPendingMapping() { gen.hasLast = true } -func (gen *Generator) addMapping(generatedLine int, generatedCharacter int, sourceIndex SourceIndex, sourceLine int, sourceCharacter int, nameIndex NameIndex) { +func (gen *Generator) addMapping(generatedLine int, generatedCharacter core.UTF16Offset, sourceIndex SourceIndex, sourceLine int, sourceCharacter core.UTF16Offset, nameIndex NameIndex) { if gen.isNewGeneratedPosition(generatedLine, generatedCharacter) || gen.isBacktrackingSourcePosition(sourceIndex, sourceLine, sourceCharacter) { gen.commitPendingMapping() @@ -242,7 +244,7 @@ func (gen *Generator) addMapping(generatedLine int, generatedCharacter int, sour gen.hasPending = true } - if sourceIndex != sourceIndexNotSet && sourceLine != notSet && sourceCharacter != notSet { + if sourceIndex != sourceIndexNotSet && sourceLine != notSet && sourceCharacter != notSetUTF16 { gen.pendingSourceIndex = sourceIndex gen.pendingSourceLine = sourceLine gen.pendingSourceCharacter = sourceCharacter @@ -255,19 +257,19 @@ func (gen *Generator) addMapping(generatedLine int, generatedCharacter int, sour } // Adds a mapping without source information -func (gen *Generator) AddGeneratedMapping(generatedLine int, generatedCharacter int) error { +func (gen *Generator) AddGeneratedMapping(generatedLine int, generatedCharacter core.UTF16Offset) error { if generatedLine < gen.pendingGeneratedLine { return errors.New("generatedLine cannot backtrack") } if generatedCharacter < 0 { return errors.New("generatedCharacter cannot be negative") } - gen.addMapping(generatedLine, generatedCharacter, sourceIndexNotSet, notSet /*sourceLine*/, notSet /*sourceCharacter*/, nameIndexNotSet) + gen.addMapping(generatedLine, generatedCharacter, sourceIndexNotSet, notSet /*sourceLine*/, notSetUTF16 /*sourceCharacter*/, nameIndexNotSet) return nil } // Adds a mapping with source information -func (gen *Generator) AddSourceMapping(generatedLine int, generatedCharacter int, sourceIndex SourceIndex, sourceLine int, sourceCharacter int) error { +func (gen *Generator) AddSourceMapping(generatedLine int, generatedCharacter core.UTF16Offset, sourceIndex SourceIndex, sourceLine int, sourceCharacter core.UTF16Offset) error { if generatedLine < gen.pendingGeneratedLine { return errors.New("generatedLine cannot backtrack") } @@ -288,7 +290,7 @@ func (gen *Generator) AddSourceMapping(generatedLine int, generatedCharacter int } // Adds a mapping with source and name information -func (gen *Generator) AddNamedSourceMapping(generatedLine int, generatedCharacter int, sourceIndex SourceIndex, sourceLine int, sourceCharacter int, nameIndex NameIndex) error { +func (gen *Generator) AddNamedSourceMapping(generatedLine int, generatedCharacter core.UTF16Offset, sourceIndex SourceIndex, sourceLine int, sourceCharacter core.UTF16Offset, nameIndex NameIndex) error { if generatedLine < gen.pendingGeneratedLine { return errors.New("generatedLine cannot backtrack") } diff --git a/internal/sourcemap/source_mapper.go b/internal/sourcemap/source_mapper.go index 0ce1c6422ed..061cf277a78 100644 --- a/internal/sourcemap/source_mapper.go +++ b/internal/sourcemap/source_mapper.go @@ -78,11 +78,11 @@ func createDocumentPositionMapper(host Host, sourceMap *RawSourceMap, mapPath st generatedPosition := -1 lineInfo := host.GetECMALineInfo(generatedAbsoluteFilePath) if lineInfo != nil { - generatedPosition = scanner.ComputePositionOfLineAndCharacterEx( + generatedPosition = scanner.ComputePositionOfLineAndUTF16Character( lineInfo.lineStarts, mapping.GeneratedLine, mapping.GeneratedCharacter, - &lineInfo.text, + lineInfo.text, true, /*allowEdits*/ ) } @@ -91,11 +91,11 @@ func createDocumentPositionMapper(host Host, sourceMap *RawSourceMap, mapPath st if mapping.IsSourceMapping() { lineInfo := host.GetECMALineInfo(sourceFileAbsolutePaths[mapping.SourceIndex]) if lineInfo != nil { - pos := scanner.ComputePositionOfLineAndCharacterEx( + pos := scanner.ComputePositionOfLineAndUTF16Character( lineInfo.lineStarts, mapping.SourceLine, mapping.SourceCharacter, - &lineInfo.text, + lineInfo.text, true, /*allowEdits*/ ) sourcePosition = pos diff --git a/internal/testutil/harnessutil/sourcemap_recorder.go b/internal/testutil/harnessutil/sourcemap_recorder.go index c269a89d6cd..581ded57fae 100644 --- a/internal/testutil/harnessutil/sourcemap_recorder.go +++ b/internal/testutil/harnessutil/sourcemap_recorder.go @@ -8,6 +8,7 @@ import ( "github.com/microsoft/typescript-go/internal/core" "github.com/microsoft/typescript-go/internal/json" + "github.com/microsoft/typescript-go/internal/scanner" "github.com/microsoft/typescript-go/internal/sourcemap" "github.com/microsoft/typescript-go/internal/stringutil" ) @@ -165,7 +166,7 @@ func (w *sourceMapSpanWriter) recordSourceMapSpan(sourceMapSpan *sourcemap.Mappi func (w *sourceMapSpanWriter) recordNewSourceFileSpan(sourceMapSpan *sourcemap.Mapping, newSourceFileCode string) { continuesLine := false - if len(w.spansOnSingleLine) > 0 && w.spansOnSingleLine[0].sourceMapSpan.GeneratedCharacter == sourceMapSpan.GeneratedLine { // !!! char == line seems like a bug in Strada? + if len(w.spansOnSingleLine) > 0 && int(w.spansOnSingleLine[0].sourceMapSpan.GeneratedCharacter) == sourceMapSpan.GeneratedLine { // !!! char == line seems like a bug in Strada? w.writeRecordedSpans() w.spansOnSingleLine = nil w.nextJsLineToWrite-- // walk back one line to reprint the line @@ -259,7 +260,7 @@ func (sw *recordedSpanWriter) iterateSpans(fn func(currentSpan *sourceMapSpanWit sw.prevEmittedCol = 0 for i := range len(sw.w.spansOnSingleLine) { fn(&sw.w.spansOnSingleLine[i], i) - sw.prevEmittedCol = sw.w.spansOnSingleLine[i].sourceMapSpan.GeneratedCharacter + sw.prevEmittedCol = int(sw.w.spansOnSingleLine[i].sourceMapSpan.GeneratedCharacter) } } @@ -271,7 +272,7 @@ func (sw *recordedSpanWriter) writeSourceMapIndent(indentLength int, indentPrefi } func (sw *recordedSpanWriter) writeSourceMapMarker(currentSpan *sourceMapSpanWithDecodeErrors, index int) { - sw.writeSourceMapMarkerEx(currentSpan, index, currentSpan.sourceMapSpan.GeneratedCharacter, false /*endContinues*/) + sw.writeSourceMapMarkerEx(currentSpan, index, int(currentSpan.sourceMapSpan.GeneratedCharacter), false /*endContinues*/) } func (sw *recordedSpanWriter) writeSourceMapMarkerEx(currentSpan *sourceMapSpanWithDecodeErrors, index int, endColumn int, endContinues bool) { @@ -289,7 +290,14 @@ func (sw *recordedSpanWriter) writeSourceMapMarkerEx(currentSpan *sourceMapSpanW } func (sw *recordedSpanWriter) writeSourceMapSourceText(currentSpan *sourceMapSpanWithDecodeErrors, index int) { - sourcePos := int(sw.w.tsLineMap[currentSpan.sourceMapSpan.SourceLine]) + currentSpan.sourceMapSpan.SourceCharacter + // Convert UTF-16 character offset from the source map to a byte position. + sourcePos := scanner.ComputePositionOfLineAndUTF16Character( + sw.w.tsLineMap, + currentSpan.sourceMapSpan.SourceLine, + currentSpan.sourceMapSpan.SourceCharacter, + sw.w.tsCode, + true, /*allowEdits*/ + ) var sourceText string if sw.w.prevWrittenSourcePos < sourcePos { // Position that goes forward, get text diff --git a/internal/testutil/tsbaseline/type_symbol_baseline.go b/internal/testutil/tsbaseline/type_symbol_baseline.go index e86884ac3e8..6fb892d5a86 100644 --- a/internal/testutil/tsbaseline/type_symbol_baseline.go +++ b/internal/testutil/tsbaseline/type_symbol_baseline.go @@ -434,7 +434,7 @@ func (walker *typeWriterWalker) writeTypeOrSymbol(node *ast.Node, isSymbolWalk b } declSourceFile := ast.GetSourceFileOfNode(declaration) - declLine, declChar := scanner.GetECMALineAndCharacterOfPosition(declSourceFile, declaration.Pos()) + declLine, declChar := scanner.GetECMALineAndUTF16CharacterOfPosition(declSourceFile, declaration.Pos()) fileName := tspath.GetBaseFileName(declSourceFile.FileName()) symbolString.WriteString("Decl(") symbolString.WriteString(fileName) @@ -442,7 +442,7 @@ func (walker *typeWriterWalker) writeTypeOrSymbol(node *ast.Node, isSymbolWalk b if isDefaultLibraryFile(fileName) { symbolString.WriteString("--, --)") } else { - fmt.Fprintf(&symbolString, "%d, %d)", declLine, declChar) + fmt.Fprintf(&symbolString, "%d, %d)", declLine, int(declChar)) } } symbolString.WriteString(")") diff --git a/internal/transformers/jsxtransforms/jsx.go b/internal/transformers/jsxtransforms/jsx.go index 371bac5e31b..216fe2e588b 100644 --- a/internal/transformers/jsxtransforms/jsx.go +++ b/internal/transformers/jsxtransforms/jsx.go @@ -590,11 +590,11 @@ func (tx *JSXTransformer) visitJsxOpeningLikeElementOrFragmentJSX( args = append(args, tx.Factory().NewFalseExpression()) } // __source development flag - line, col := scanner.GetECMALineAndCharacterOfPosition(originalFile.AsSourceFile(), location.Pos()) + line, col := scanner.GetECMALineAndUTF16CharacterOfPosition(originalFile.AsSourceFile(), location.Pos()) args = append(args, tx.Factory().NewObjectLiteralExpression(tx.Factory().NewNodeList([]*ast.Node{ tx.Factory().NewPropertyAssignment(nil, tx.Factory().NewIdentifier("fileName"), nil, nil, tx.getCurrentFileNameExpression()), tx.Factory().NewPropertyAssignment(nil, tx.Factory().NewIdentifier("lineNumber"), nil, nil, tx.Factory().NewNumericLiteral(strconv.FormatInt(int64(line+1), 10), ast.TokenFlagsNone)), - tx.Factory().NewPropertyAssignment(nil, tx.Factory().NewIdentifier("columnNumber"), nil, nil, tx.Factory().NewNumericLiteral(strconv.FormatInt(int64(col+1), 10), ast.TokenFlagsNone)), + tx.Factory().NewPropertyAssignment(nil, tx.Factory().NewIdentifier("columnNumber"), nil, nil, tx.Factory().NewNumericLiteral(strconv.FormatInt(int64(col)+1, 10), ast.TokenFlagsNone)), }), false)) // __self development flag args = append(args, tx.Factory().NewThisExpression()) diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitLateBoundAssignments2.symbols b/testdata/baselines/reference/submodule/compiler/declarationEmitLateBoundAssignments2.symbols index 60d53f79963..61d271d2564 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitLateBoundAssignments2.symbols +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitLateBoundAssignments2.symbols @@ -19,10 +19,10 @@ const emoji = "πŸ€·β€β™‚οΈ" >emoji : Symbol(emoji, Decl(declarationEmitLateBoundAssignments2.ts, 6, 5)) export function decl() {} ->decl : Symbol(decl, Decl(declarationEmitLateBoundAssignments2.ts, 6, 20)) +>decl : Symbol(decl, Decl(declarationEmitLateBoundAssignments2.ts, 6, 21)) decl["B"] = 'foo' ->decl : Symbol(decl, Decl(declarationEmitLateBoundAssignments2.ts, 6, 20)) +>decl : Symbol(decl, Decl(declarationEmitLateBoundAssignments2.ts, 6, 21)) >"B" : Symbol(decl["B"], Decl(declarationEmitLateBoundAssignments2.ts, 8, 25)) export function decl2() {} @@ -82,10 +82,10 @@ decl9["πŸ€ͺ"] = 0 >"πŸ€ͺ" : Symbol(decl9["\uD83E\uDD2A"], Decl(declarationEmitLateBoundAssignments2.ts, 32, 26)) export function decl10() {} ->decl10 : Symbol(decl10, Decl(declarationEmitLateBoundAssignments2.ts, 33, 14)) +>decl10 : Symbol(decl10, Decl(declarationEmitLateBoundAssignments2.ts, 33, 15)) decl10[emoji] = 0 ->decl10 : Symbol(decl10, Decl(declarationEmitLateBoundAssignments2.ts, 33, 14)) +>decl10 : Symbol(decl10, Decl(declarationEmitLateBoundAssignments2.ts, 33, 15)) >emoji : Symbol(emoji, Decl(declarationEmitLateBoundAssignments2.ts, 6, 5)) export const arrow = () => {} diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitLateBoundAssignments2.symbols.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitLateBoundAssignments2.symbols.diff index 48d64eb4a7e..f55a47124c7 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitLateBoundAssignments2.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitLateBoundAssignments2.symbols.diff @@ -5,11 +5,11 @@ export function decl() {} ->decl : Symbol(decl, Decl(declarationEmitLateBoundAssignments2.ts, 6, 21), Decl(declarationEmitLateBoundAssignments2.ts, 8, 25)) -+>decl : Symbol(decl, Decl(declarationEmitLateBoundAssignments2.ts, 6, 20)) ++>decl : Symbol(decl, Decl(declarationEmitLateBoundAssignments2.ts, 6, 21)) decl["B"] = 'foo' ->decl : Symbol(decl, Decl(declarationEmitLateBoundAssignments2.ts, 6, 21), Decl(declarationEmitLateBoundAssignments2.ts, 8, 25)) -+>decl : Symbol(decl, Decl(declarationEmitLateBoundAssignments2.ts, 6, 20)) ++>decl : Symbol(decl, Decl(declarationEmitLateBoundAssignments2.ts, 6, 21)) >"B" : Symbol(decl["B"], Decl(declarationEmitLateBoundAssignments2.ts, 8, 25)) export function decl2() {} @@ -86,11 +86,11 @@ export function decl10() {} ->decl10 : Symbol(decl10, Decl(declarationEmitLateBoundAssignments2.ts, 33, 15), Decl(declarationEmitLateBoundAssignments2.ts, 35, 27)) -+>decl10 : Symbol(decl10, Decl(declarationEmitLateBoundAssignments2.ts, 33, 14)) ++>decl10 : Symbol(decl10, Decl(declarationEmitLateBoundAssignments2.ts, 33, 15)) decl10[emoji] = 0 ->decl10 : Symbol(decl10, Decl(declarationEmitLateBoundAssignments2.ts, 33, 15), Decl(declarationEmitLateBoundAssignments2.ts, 35, 27)) -+>decl10 : Symbol(decl10, Decl(declarationEmitLateBoundAssignments2.ts, 33, 14)) ++>decl10 : Symbol(decl10, Decl(declarationEmitLateBoundAssignments2.ts, 33, 15)) >emoji : Symbol(emoji, Decl(declarationEmitLateBoundAssignments2.ts, 6, 5)) export const arrow = () => {} diff --git a/testdata/baselines/reference/submodule/compiler/extendedUnicodePlaneIdentifiers.symbols b/testdata/baselines/reference/submodule/compiler/extendedUnicodePlaneIdentifiers.symbols index ea833ecda88..b51d0271492 100644 --- a/testdata/baselines/reference/submodule/compiler/extendedUnicodePlaneIdentifiers.symbols +++ b/testdata/baselines/reference/submodule/compiler/extendedUnicodePlaneIdentifiers.symbols @@ -15,13 +15,13 @@ console.log(𝑀 + π‘š); // 9 >π‘š : Symbol(π‘š, Decl(extendedUnicodePlaneIdentifiers.ts, 0, 5)) class K { ->K : Symbol(K, Decl(extendedUnicodePlaneIdentifiers.ts, 2, 19)) +>K : Symbol(K, Decl(extendedUnicodePlaneIdentifiers.ts, 2, 21)) #π‘š = 4; >#π‘š : Symbol(K.#π‘š, Decl(extendedUnicodePlaneIdentifiers.ts, 4, 9)) #𝑀 = 5; ->#𝑀 : Symbol(K.#𝑀, Decl(extendedUnicodePlaneIdentifiers.ts, 5, 11)) +>#𝑀 : Symbol(K.#𝑀, Decl(extendedUnicodePlaneIdentifiers.ts, 5, 12)) } // lower 8 bits look like 'a' diff --git a/testdata/baselines/reference/submodule/compiler/extendedUnicodePlaneIdentifiers.symbols.diff b/testdata/baselines/reference/submodule/compiler/extendedUnicodePlaneIdentifiers.symbols.diff index dbd66df9584..0da974fbfb2 100644 --- a/testdata/baselines/reference/submodule/compiler/extendedUnicodePlaneIdentifiers.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/extendedUnicodePlaneIdentifiers.symbols.diff @@ -1,11 +1,7 @@ --- old.extendedUnicodePlaneIdentifiers.symbols +++ new.extendedUnicodePlaneIdentifiers.symbols -@@= skipped -14, +14 lines =@@ - >π‘š : Symbol(π‘š, Decl(extendedUnicodePlaneIdentifiers.ts, 0, 5)) - - class K { -->K : Symbol(K, Decl(extendedUnicodePlaneIdentifiers.ts, 2, 21)) -+>K : Symbol(K, Decl(extendedUnicodePlaneIdentifiers.ts, 2, 19)) +@@= skipped -17, +17 lines =@@ + >K : Symbol(K, Decl(extendedUnicodePlaneIdentifiers.ts, 2, 21)) #π‘š = 4; ->#π‘š : Symbol(K[#π‘š], Decl(extendedUnicodePlaneIdentifiers.ts, 4, 9)) @@ -13,7 +9,7 @@ #𝑀 = 5; ->#𝑀 : Symbol(K[#𝑀], Decl(extendedUnicodePlaneIdentifiers.ts, 5, 12)) -+>#𝑀 : Symbol(K.#𝑀, Decl(extendedUnicodePlaneIdentifiers.ts, 5, 11)) ++>#𝑀 : Symbol(K.#𝑀, Decl(extendedUnicodePlaneIdentifiers.ts, 5, 12)) } // lower 8 bits look like 'a' \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/extendedUnicodePlaneIdentifiersJSDoc.symbols b/testdata/baselines/reference/submodule/compiler/extendedUnicodePlaneIdentifiersJSDoc.symbols index 3d9c42644b0..8cdc0e81abf 100644 --- a/testdata/baselines/reference/submodule/compiler/extendedUnicodePlaneIdentifiersJSDoc.symbols +++ b/testdata/baselines/reference/submodule/compiler/extendedUnicodePlaneIdentifiersJSDoc.symbols @@ -9,12 +9,12 @@ function foo(π‘š, 𝑀) { >foo : Symbol(foo, Decl(file.js, 0, 0)) >π‘š : Symbol(π‘š, Decl(file.js, 5, 13)) ->𝑀 : Symbol(𝑀, Decl(file.js, 5, 15)) +>𝑀 : Symbol(𝑀, Decl(file.js, 5, 16)) console.log(𝑀 + π‘š); >console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) >console : Symbol(console, Decl(lib.dom.d.ts, --, --)) >log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) ->𝑀 : Symbol(𝑀, Decl(file.js, 5, 15)) +>𝑀 : Symbol(𝑀, Decl(file.js, 5, 16)) >π‘š : Symbol(π‘š, Decl(file.js, 5, 13)) } diff --git a/testdata/baselines/reference/submodule/compiler/extendedUnicodePlaneIdentifiersJSDoc.symbols.diff b/testdata/baselines/reference/submodule/compiler/extendedUnicodePlaneIdentifiersJSDoc.symbols.diff deleted file mode 100644 index 01bb90f5284..00000000000 --- a/testdata/baselines/reference/submodule/compiler/extendedUnicodePlaneIdentifiersJSDoc.symbols.diff +++ /dev/null @@ -1,17 +0,0 @@ ---- old.extendedUnicodePlaneIdentifiersJSDoc.symbols -+++ new.extendedUnicodePlaneIdentifiersJSDoc.symbols -@@= skipped -8, +8 lines =@@ - function foo(π‘š, 𝑀) { - >foo : Symbol(foo, Decl(file.js, 0, 0)) - >π‘š : Symbol(π‘š, Decl(file.js, 5, 13)) -->𝑀 : Symbol(𝑀, Decl(file.js, 5, 16)) -+>𝑀 : Symbol(𝑀, Decl(file.js, 5, 15)) - - console.log(𝑀 + π‘š); - >console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) - >console : Symbol(console, Decl(lib.dom.d.ts, --, --)) - >log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) -->𝑀 : Symbol(𝑀, Decl(file.js, 5, 16)) -+>𝑀 : Symbol(𝑀, Decl(file.js, 5, 15)) - >π‘š : Symbol(π‘š, Decl(file.js, 5, 13)) - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/sourceMap-LineBreaks(target=es2015).js.map b/testdata/baselines/reference/submodule/compiler/sourceMap-LineBreaks(target=es2015).js.map index bec795fb31b..a5998d5484d 100644 --- a/testdata/baselines/reference/submodule/compiler/sourceMap-LineBreaks(target=es2015).js.map +++ b/testdata/baselines/reference/submodule/compiler/sourceMap-LineBreaks(target=es2015).js.map @@ -1,3 +1,3 @@ //// [sourceMap-LineBreaks.js.map] -{"version":3,"file":"sourceMap-LineBreaks.js","sourceRoot":"","sources":["sourceMap-LineBreaks.ts"],"names":[],"mappings":";AAAA,IAAI,qBAAqB,GAAG,EAAE,CAAC;AAC/B,IAAI,0BAA0B,GAAG,EAAE,CAAC;AACpC,IAAI,gBAAgB,GAAG,CAAC,CAAC;AAAC,IAAI,gBAAgB,GAAG,CAAC,CAAC;AACnD,IAAI,8BAA8B,GAAG,CAAC,CAAC;AACvC,IAAI,sBAAsB,GAAG,CAAC,CAAC;AAC/B,IAAI,8BAA8B,GAAG,CAAC,CAAC;AAEvC,IAAI,sCAAsC,GAAG,CAAC,CAAC;AAE/C,IAAI,yBAAyB,GAAG;OACzB,CAAC;AACR,IAAI,uCAAuC,GAAG;OACvC,CAAC;AACR,IAAI,+BAA+B,GAAG;OAC/B,CAAC;AAER,IAAI,8BAA8B,GAAG;OAC9B,CAAC;AACR,IAAI,mCAAmC,GAAG;OACnC,CAAC;AACR,IAAI,yBAAyB,GAAG,iBAAgB,CAAC"} -//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KdmFyIGVuZHNXaXRobGluZVNlcGFyYXRvciA9IDEwOw0KdmFyIGVuZHNXaXRoUGFyYWdyYXBoU2VwYXJhdG9yID0gMTA7DQp2YXIgZW5kc1dpdGhOZXh0TGluZSA9IDE7DQp2YXIgZW5kc1dpdGhMaW5lRmVlZCA9IDE7DQp2YXIgZW5kc1dpdGhDYXJyaWFnZVJldHVybkxpbmVGZWVkID0gMTsNCnZhciBlbmRzV2l0aENhcnJpYWdlUmV0dXJuID0gMTsNCnZhciBlbmRzV2l0aExpbmVGZWVkQ2FycmlhZ2VSZXR1cm4gPSAxOw0KdmFyIGVuZHNXaXRoTGluZUZlZWRDY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0ZXJhbFdpdGhOZXh0TGluZSA9ICJsaW5lIDFcwoVsaW5lIDIiOw== +{"version":3,"file":"sourceMap-LineBreaks.js","sourceRoot":"","sources":["sourceMap-LineBreaks.ts"],"names":[],"mappings":";AAAA,IAAI,qBAAqB,GAAG,EAAE,CAAC;AAC/B,IAAI,0BAA0B,GAAG,EAAE,CAAC;AACpC,IAAI,gBAAgB,GAAG,CAAC,CAAC;AAAC,IAAI,gBAAgB,GAAG,CAAC,CAAC;AACnD,IAAI,8BAA8B,GAAG,CAAC,CAAC;AACvC,IAAI,sBAAsB,GAAG,CAAC,CAAC;AAC/B,IAAI,8BAA8B,GAAG,CAAC,CAAC;AAEvC,IAAI,sCAAsC,GAAG,CAAC,CAAC;AAE/C,IAAI,yBAAyB,GAAG;OACzB,CAAC;AACR,IAAI,uCAAuC,GAAG;OACvC,CAAC;AACR,IAAI,+BAA+B,GAAG;OAC/B,CAAC;AAER,IAAI,8BAA8B,GAAG;OAC9B,CAAC;AACR,IAAI,mCAAmC,GAAG;OACnC,CAAC;AACR,IAAI,yBAAyB,GAAG,gBAAgB,CAAC"} +//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KdmFyIGVuZHNXaXRobGluZVNlcGFyYXRvciA9IDEwOw0KdmFyIGVuZHNXaXRoUGFyYWdyYXBoU2VwYXJhdG9yID0gMTA7DQp2YXIgZW5kc1dpdGhOZXh0TGluZSA9IDE7DQp2YXIgZW5kc1dpdGhMaW5lRmVlZCA9IDE7DQp2YXIgZW5kc1dpdGhDYXJyaWFnZVJldHVybkxpbmVGZWVkID0gMTsNCnZhciBlbmRzV2l0aENhcnJpYWdlUmV0dXJuID0gMTsNCnZhciBlbmRzV2l0aExpbmVGZWVkQ2FycmlhZ2VSZXR1cm4gPSAxOw0KdmFyIGVuZHNXaXRoTGluZUZlZWRDYXJyaWFnZVJldHVybkxpbmVGZWVkID0gMTsNCnZhciBzdHJpbmdMaXRlcmFsV2l0aExpbmVGZWVkID0gIm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iler/sourceMap-LineBreaks(target=es2015).js.map.diff b/testdata/baselines/reference/submodule/compiler/sourceMap-LineBreaks(target=es2015).js.map.diff deleted file mode 100644 index 86127623b23..00000000000 --- a/testdata/baselines/reference/submodule/compiler/sourceMap-LineBreaks(target=es2015).js.map.diff +++ /dev/null @@ -1,8 +0,0 @@ ---- old.sourceMap-LineBreaks(target=es2015).js.map -+++ new.sourceMap-LineBreaks(target=es2015).js.map -@@= skipped -0, +0 lines =@@ - //// [sourceMap-LineBreaks.js.map] --{"version":3,"file":"sourceMap-LineBreaks.js","sourceRoot":"","sources":["sourceMap-LineBreaks.ts"],"names":[],"mappings":";AAAA,IAAI,qBAAqB,GAAG,EAAE,CAAC;AAC/B,IAAI,0BAA0B,GAAG,EAAE,CAAC;AACpC,IAAI,gBAAgB,GAAG,CAAC,CAAC;AAAC,IAAI,gBAAgB,GAAG,CAAC,CAAC;AACnD,IAAI,8BAA8B,GAAG,CAAC,CAAC;AACvC,IAAI,sBAAsB,GAAG,CAAC,CAAC;AAC/B,IAAI,8BAA8B,GAAG,CAAC,CAAC;AAEvC,IAAI,sCAAsC,GAAG,CAAC,CAAC;AAE/C,IAAI,yBAAyB,GAAG;OACzB,CAAC;AACR,IAAI,uCAAuC,GAAG;OACvC,CAAC;AACR,IAAI,+BAA+B,GAAG;OAC/B,CAAC;AAER,IAAI,8BAA8B,GAAG;OAC9B,CAAC;AACR,IAAI,mCAAmC,GAAG;OACnC,CAAC;AACR,IAAI,yBAAyB,GAAG,gBAAgB,CAAC"} --//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KdmFyIGVuZHNXaXRobGluZVNlcGFyYXRvciA9IDEwOw0KdmFyIGVuZHNXaXRoUGFyYWdyYXBoU2VwYXJhdG9yID0gMTA7DQp2YXIgZW5kc1dpdGhOZXh0TGluZSA9IDE7DQp2YXIgZW5kc1dpdGhMaW5lRmVlZCA9IDE7DQp2YXIgZW5kc1dpdGhDYXJyaWFnZVJldHVybkxpb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2VwYXJhdG9yID0gImxpbmUgMVzigKhsaW5lIDIiO+KAqXZhciBzdHJpbmdMaXRlcmFsV2l0aFBhcmFncmFwaFNlcGFyYXRvciA9ICJsaW5lIDFc4oCpbGluZSAyIjvigKl2YXIgc3RyaW5nTGl0ZXJhbFdpdGhOZXh0TGluZSA9ICJsaW5lIDFcwoVsaW5lIDIiOw== -+{"version":3,"file":"sourceMap-LineBreaks.js","sourceRoot":"","sources":["sourceMap-LineBreaks.ts"],"names":[],"mappings":";AAAA,IAAI,qBAAqB,GAAG,EAAE,CAAC;AAC/B,IAAI,0BAA0B,GAAG,EAAE,CAAC;AACpC,IAAI,gBAAgB,GAAG,CAAC,CAAC;AAAC,IAAI,gBAAgB,GAAG,CAAC,CAAC;AACnD,IAAI,8BAA8B,GAAG,CAAC,CAAC;AACvC,IAAI,sBAAsB,GAAG,CAAC,CAAC;AAC/B,IAAI,8BAA8B,GAAG,CAAC,CAAC;AAEvC,IAAI,sCAAsC,GAAG,CAAC,CAAC;AAE/C,IAAI,yBAAyB,GAAG;OACzB,CAAC;AACR,IAAI,uCAAuC,GAAG;OACvC,CAAC;AACR,IAAI,+BAA+B,GAAG;OAC/B,CAAC;AAER,IAAI,8BAA8B,GAAG;OAC9B,CAAC;AACR,IAAI,mCAAmC,GAAG;OACnC,CAAC;AACR,IAAI,yBAAyB,GAAG,iBAAgB,CAAC"} -+//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KdmFyIGVuZHNXaXRobGluZVNlcGFyYXRvciA9IDEwOw0KdmFyIGVuZHNXaXRoUGFyYWdyYXBoU2VwYXJhdG9yID0gMTA7DQp2YXIgZW5kc1dpdGhOZXh0TGluZSA9IDE7DQp2YXIgZW5kc1dpdGhMaW5lRmVlZCA9IDE7DQp2YXIgZW5kc1dpdGhDYXJyaWFnZVJldHVybkxpbmVGZWVkID0gMTsNCnZhciBlbmRzV2l0aENhcnJpYWdlUmV0dXJuID0gMTsNCnZhciBlbmRzV2l0aEx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mFncmFwaFNlcGFyYXRvciA9ICJsaW5lIDFc4oCpbGluZSAyIjvigKl2YXIgc3RyaW5nTGl0ZXJhbFdpdGhOZXh0TGluZSA9ICJsaW5lIDFcwoVsaW5lIDIiOw== \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/sourceMap-LineBreaks(target=es2015).sourcemap.txt b/testdata/baselines/reference/submodule/compiler/sourceMap-LineBreaks(target=es2015).sourcemap.txt index 19d35268278..fe2fbcae32c 100644 --- a/testdata/baselines/reference/submodule/compiler/sourceMap-LineBreaks(target=es2015).sourcemap.txt +++ b/testdata/baselines/reference/submodule/compiler/sourceMap-LineBreaks(target=es2015).sourcemap.txt @@ -79,12 +79,12 @@ sourceFile:sourceMap-LineBreaks.ts 5 > ^ 6 > ^ 7 > ^^^^^^^^^^^^^^^-> -1->Β -2 >…var -3 > endsWithLineFee -4 > d = -5 > -6 > 1 +1->Β… +2 >var +3 > endsWithLineFeed +4 > = +5 > 1 +6 > ; 1->Emitted(5, 1) Source(3, 27) + SourceIndex(0) 2 >Emitted(5, 5) Source(3, 31) + SourceIndex(0) 3 >Emitted(5, 21) Source(3, 47) + SourceIndex(0) @@ -99,7 +99,7 @@ sourceFile:sourceMap-LineBreaks.ts 4 > ^^^ 5 > ^ 6 > ^ -1->; +1-> > 2 >var 3 > endsWithCarriageReturnLineFeed @@ -306,19 +306,19 @@ sourceFile:sourceMap-LineBreaks.ts 2 >^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^ 4 > ^^^ -5 > ^^^^^^^^^^^^^^^^^ -6 > ^ +5 > ^^^^^^^^^^^^^^^^ +6 > ^ 1->
 > 2 >var 3 > stringLiteralWithNextLine 4 > = -5 > "line 1\Β…line 2 -6 > " +5 > "line 1\Β…line 2" +6 > ; 1->Emitted(20, 1) Source(21, 1) + SourceIndex(0) 2 >Emitted(20, 5) Source(21, 5) + SourceIndex(0) 3 >Emitted(20, 30) Source(21, 30) + SourceIndex(0) 4 >Emitted(20, 33) Source(21, 33) + SourceIndex(0) -5 >Emitted(20, 50) Source(21, 49) + SourceIndex(0) -6 >Emitted(20, 51) Source(21, 50) + SourceIndex(0) +5 >Emitted(20, 49) Source(21, 49) + SourceIndex(0) +6 >Emitted(20, 50) Source(21, 50) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMap-LineBreaks.js.map \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/sourceMap-LineBreaks(target=es2015).sourcemap.txt.diff b/testdata/baselines/reference/submodule/compiler/sourceMap-LineBreaks(target=es2015).sourcemap.txt.diff index f5d3d7660a9..c2b777146cb 100644 --- a/testdata/baselines/reference/submodule/compiler/sourceMap-LineBreaks(target=es2015).sourcemap.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/sourceMap-LineBreaks(target=es2015).sourcemap.txt.diff @@ -1,34 +1,6 @@ --- old.sourceMap-LineBreaks(target=es2015).sourcemap.txt +++ new.sourceMap-LineBreaks(target=es2015).sourcemap.txt -@@= skipped -78, +78 lines =@@ - 5 > ^ - 6 > ^ - 7 > ^^^^^^^^^^^^^^^-> --1->Β… --2 >var --3 > endsWithLineFeed --4 > = --5 > 1 --6 > ; -+1->Β -+2 >…var -+3 > endsWithLineFee -+4 > d = -+5 > -+6 > 1 - 1->Emitted(5, 1) Source(3, 27) + SourceIndex(0) - 2 >Emitted(5, 5) Source(3, 31) + SourceIndex(0) - 3 >Emitted(5, 21) Source(3, 47) + SourceIndex(0) -@@= skipped -20, +20 lines =@@ - 4 > ^^^ - 5 > ^ - 6 > ^ --1-> -+1->; - > - 2 >var - 3 > endsWithCarriageReturnLineFeed -@@= skipped -149, +149 lines =@@ +@@= skipped -247, +247 lines =@@ >>>line 2"; 1 >^^^^^^^ 2 > ^ @@ -54,30 +26,4 @@ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >"line 1\
 >line 2" 2 > ; - 1 >Emitted(19, 8) Source(20, 8) + SourceIndex(0) -@@= skipped -11, +11 lines =@@ - 2 >^^^^ - 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^ - 4 > ^^^ --5 > ^^^^^^^^^^^^^^^^ --6 > ^ -+5 > ^^^^^^^^^^^^^^^^^ -+6 > ^ - 1->
 > - 2 >var - 3 > stringLiteralWithNextLine - 4 > = --5 > "line 1\Β…line 2" --6 > ; -+5 > "line 1\Β…line 2 -+6 > " - 1->Emitted(20, 1) Source(21, 1) + SourceIndex(0) - 2 >Emitted(20, 5) Source(21, 5) + SourceIndex(0) - 3 >Emitted(20, 30) Source(21, 30) + SourceIndex(0) - 4 >Emitted(20, 33) Source(21, 33) + SourceIndex(0) --5 >Emitted(20, 49) Source(21, 49) + SourceIndex(0) --6 >Emitted(20, 50) Source(21, 50) + SourceIndex(0) -+5 >Emitted(20, 50) Source(21, 49) + SourceIndex(0) -+6 >Emitted(20, 51) Source(21, 50) + SourceIndex(0) - --- - >>>//# sourceMappingURL=sourceMap-LineBreaks.js.map \ No newline at end of file + 1 >Emitted(19, 8) Source(20, 8) + SourceIndex(0) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames02(target=es2015).errors.txt b/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames02(target=es2015).errors.txt index 4e4cb21aabc..a6ba7c04e91 100644 --- a/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames02(target=es2015).errors.txt +++ b/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames02(target=es2015).errors.txt @@ -1,7 +1,7 @@ -astralAsSurrogatePair.ts(1,16): error TS1127: Invalid character. -astralAsSurrogatePair.ts(1,17): error TS2305: Module '"./extendedEscapesForAstralsInVarsAndClasses.js"' has no exported member 'uD800'. -astralAsSurrogatePair.ts(1,22): error TS1127: Invalid character. -astralAsSurrogatePair.ts(1,23): error TS2305: Module '"./extendedEscapesForAstralsInVarsAndClasses.js"' has no exported member 'uDEA7'. +astralAsSurrogatePair.ts(1,17): error TS1127: Invalid character. +astralAsSurrogatePair.ts(1,18): error TS2305: Module '"./extendedEscapesForAstralsInVarsAndClasses.js"' has no exported member 'uD800'. +astralAsSurrogatePair.ts(1,23): error TS1127: Invalid character. +astralAsSurrogatePair.ts(1,24): error TS2305: Module '"./extendedEscapesForAstralsInVarsAndClasses.js"' has no exported member 'uDEA7'. ==== extendedEscapesForAstralsInVarsAndClasses.ts (0 errors) ==== diff --git a/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames02(target=es2015).errors.txt.diff b/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames02(target=es2015).errors.txt.diff index 90e97ba287a..016bf7dc8db 100644 --- a/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames02(target=es2015).errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames02(target=es2015).errors.txt.diff @@ -1,17 +1,5 @@ --- old.unicodeEscapesInNames02(target=es2015).errors.txt +++ new.unicodeEscapesInNames02(target=es2015).errors.txt -@@= skipped -0, +0 lines =@@ --astralAsSurrogatePair.ts(1,17): error TS1127: Invalid character. --astralAsSurrogatePair.ts(1,18): error TS2305: Module '"./extendedEscapesForAstralsInVarsAndClasses.js"' has no exported member 'uD800'. --astralAsSurrogatePair.ts(1,23): error TS1127: Invalid character. --astralAsSurrogatePair.ts(1,24): error TS2305: Module '"./extendedEscapesForAstralsInVarsAndClasses.js"' has no exported member 'uDEA7'. -+astralAsSurrogatePair.ts(1,16): error TS1127: Invalid character. -+astralAsSurrogatePair.ts(1,17): error TS2305: Module '"./extendedEscapesForAstralsInVarsAndClasses.js"' has no exported member 'uD800'. -+astralAsSurrogatePair.ts(1,22): error TS1127: Invalid character. -+astralAsSurrogatePair.ts(1,23): error TS2305: Module '"./extendedEscapesForAstralsInVarsAndClasses.js"' has no exported member 'uDEA7'. - - - ==== extendedEscapesForAstralsInVarsAndClasses.ts (0 errors) ==== @@= skipped -31, +31 lines =@@ ==== astralAsSurrogatePair.ts (4 errors) ==== diff --git a/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames02(target=es2015).js.map b/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames02(target=es2015).js.map index e4525fa34e9..5bff538ed47 100644 --- a/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames02(target=es2015).js.map +++ b/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames02(target=es2015).js.map @@ -1,6 +1,6 @@ //// [extendedEscapesForAstralsInVarsAndClasses.js.map] -{"version":3,"file":"extendedEscapesForAstralsInVarsAndClasses.js","sourceRoot":"","sources":["extendedEscapesForAstralsInVarsAndClasses.ts"],"names":[],"mappings":"AAIA,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;IAChB,IAAC,GAAG,OAAO,CAAC;AAChB,CAAC;KACI,CAAC;IACF,SAAS,GAAG,OAAO,CAAC;AACxB,CAAC;AAED,MAAM,GAAG;IACL,SAAS,CAAS;IAClB,cAAc;QACV,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAAA,CAC7B;IACD,OAAO,GAAG;QACN,OAAO,IAAI,CAAC,IAAC,CAAC;IAAA,CACjB;CACJ;AAED,MAAM,CAAC,IAAI,KAAE,GAAG,IAAI,GAAG,EAAE,CAAC,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;AAE1D,UAAU,IAAI,GAAG,CAAC"} -//// https://sokra.github.io/source-map-visualization#base64,aWYgKE1hdGgucmFuZG9tKCkpIHsNCiAgICDwkIqnID0gImhlbGxvIjsNCn0NCmVsc2Ugew0KICAgIFx1ezEwMkE3fSA9ICJoYWxsbyI7DQp9DQpjbGFzcyBGb28gew0KICAgIFx1ezEwMkE3fTsNCiAgICBjb25zdHJ1Y3RvcigpIHsNCiAgICAgICAgdGhpcy5cdXsxMDJBN30gPSAiIHdvcmxkIjsNCiAgICB9DQogICAgbWV0aG9kQSgpIHsNCiAgICAgICAgcmV0dXJuIHRoaXMu8JCKpzsNCiAgICB9DQp9DQpleHBvcnQgdmFyIF/wkIqnID0g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YW5kb20oKSkgewogICAg8JCKpyA9ICJoZWxsbyI7Cn0KZWxzZSB7CiAgICBcdXsxMDJBN30gPSAiaGFsbG8iOwp9CgpjbGFzcyBGb28gewogICAgXHV7MTAyQTd9OiBzdHJpbmc7CiAgICBjb25zdHJ1Y3RvcigpIHsKICAgICAgICB0aGlzLlx1ezEwMkE3fSA9ICIgd29ybGQiOwogICAgfQogICAgbWV0aG9kQSgpIHsKICAgICAgICByZXR1cm4gdGhpcy7wkIqnOwogICAgfQp9CgpleHBvcnQgdmFyIF/wkIqnID0gbmV3IEZvbygpLlx1ezEwMkE3fSArIG5ldyBGb28oKS5tZXRob2RBKCk7CgpfXHV7MTAyQTd9ICs9ICIhIjsK +{"version":3,"file":"extendedEscapesForAstralsInVarsAndClasses.js","sourceRoot":"","sources":["extendedEscapesForAstralsInVarsAndClasses.ts"],"names":[],"mappings":"AAIA,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;IAChB,EAAE,GAAG,OAAO,CAAC;AACjB,CAAC;KACI,CAAC;IACF,SAAS,GAAG,OAAO,CAAC;AACxB,CAAC;AAED,MAAM,GAAG;IACL,SAAS,CAAS;IAClB,cAAc;QACV,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAAA,CAC7B;IACD,OAAO,GAAG;QACN,OAAO,IAAI,CAAC,EAAE,CAAC;IAAA,CAClB;CACJ;AAED,MAAM,CAAC,IAAI,GAAG,GAAG,IAAI,GAAG,EAAE,CAAC,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;AAE3D,UAAU,IAAI,GAAG,CAAC"} +//// https://sokra.github.io/source-map-visualization#base64,aWYgKE1hdGgucmFuZG9tKCkpIHsNCiAgICDwkIqnID0gImhlbGxvIjsNCn0NCmVsc2Ugew0KICAgIFx1ezEwMkE3fSA9ICJoYWxsbyI7DQp9DQpjbGFzcyBGb28gew0KICAgIFx1ezEwMkE3fTsNCiAgICBjb25zdHJ1Y3RvcigpIHsNC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dBQUcsQ0FBQyJ9,Ly8gVSsxMDJBNyBDQVJJQU4gTEVUVEVSIEEyCmRlY2xhcmUgdmFyIPCQiqc6IHN0cmluZzsKZGVjbGFyZSB2YXIgXHV7MTAyQTd9OiBzdHJpbmc7CgppZiAoTWF0aC5yYW5kb20oKSkgewogICAg8JCKpyA9ICJoZWxsbyI7Cn0KZWxzZSB7CiAgICBcdXsxMDJBN30gPSAiaGFsbG8iOwp9CgpjbGFzcyBGb28gewogICAgXHV7MTAyQTd9OiBzdHJpbmc7CiAgICBjb25zdHJ1Y3RvcigpIHsKICAgICAgICB0aGlzLlx1ezEwMkE3fSA9ICIgd29ybGQiOwogICAgfQogICAgbWV0aG9kQSgpIHsKICAgICAgICByZXR1cm4gdGhpcy7wkIqnOwogICAgfQp9CgpleHBvcnQgdmFyIF/wkIqnID0gbmV3IEZvbygpLlx1ezEwMkE3fSArIG5ldyBGb28oKS5tZXRob2RBKCk7CgpfXHV7MTAyQTd9ICs9ICIhIjsK //// [astralAsSurrogatePair.js.map] {"version":3,"file":"astralAsSurrogatePair.js","sourceRoot":"","sources":["astralAsSurrogatePair.ts"],"names":[],"mappings":""} diff --git a/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames02(target=es2015).js.map.diff b/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames02(target=es2015).js.map.diff index 617b6936d6b..5776ca35622 100644 --- a/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames02(target=es2015).js.map.diff +++ b/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames02(target=es2015).js.map.diff @@ -4,8 +4,8 @@ //// [extendedEscapesForAstralsInVarsAndClasses.js.map] -{"version":3,"file":"extendedEscapesForAstralsInVarsAndClasses.js","sourceRoot":"","sources":["extendedEscapesForAstralsInVarsAndClasses.ts"],"names":[],"mappings":"AAIA,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;IAChB,EAAE,GAAG,OAAO,CAAC;AACjB,CAAC;KACI,CAAC;IACF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DQUFDO0lBQ2hCLEVBQUUsR0FBRyxPQUFPLENBQUM7QUFDakIsQ0FBQztLQUNJLENBQUM7SUFDRixTQUFTLEdBQUcsT0FBTyxDQUFDO0FBQ3hCLENBQUM7QUFFRCxNQUFNLEdBQUc7SUFFTDtRQUNJLElBQUksQ0FBQyxTQUFTLEdBQUcsUUFBUSxDQUFDO0lBQzlCLENBQUM7SUFDRCxPQUFPO1FBQ0gsT0FBTyxJQUFJLENBQUMsRUFBRSxDQUFDO0lBQ25CLENBQUM7Q0FDSjtBQUVELE1BQU0sQ0FBQyxJQUFJLEdBQUcsR0FBRyxJQUFJLEdBQUcsRUFBRSxDQUFDLFNBQVMsR0FBRyxJQUFJLEdBQUcsRUFBRSxDQUFDLE9BQU8sRUFBRSxDQUFDO0FBRTNELFVBQVUsSUFBSSxHQUFHLENBQUMifQ==,Ly8gVSsxMDJBNyBDQVJJQU4gTEVUVEVSIEEyCmRlY2xhcmUgdmFyIO2ggO26pzogc3RyaW5nOwpkZWNsYXJlIHZhciBcdXsxMDJBN306IHN0cmluZzsKCmlmIChNYXRoLnJhbmRvbSgpKSB7CiAgICDtoIDtuqcgPSAiaGVsbG8iOwp9CmVsc2UgewogICAgXHV7MTAyQTd9ID0gImhhbGxvIjsKfQoKY2xhc3MgRm9vIHsKICAgIFx1ezEwMkE3fTogc3RyaW5nOwogICAgY29uc3RydWN0b3IoKSB7CiAgICAgICAgdGhpcy5cdXsxMDJBN30gPSAiIHdvcmxkIjsKICAgIH0KICAgIG1ldGhvZEEoKSB7CiAgICAgICAgcmV0dXJuIHRoaXMu7aCA7bqnOwogICAgfQp9CgpleHBvcnQgdmFyIF/toIDtuqcgPSBuZXcgRm9vKCkuXHV7MTAyQTd9ICsgbmV3IEZvbygpLm1ldGhvZEEoKTsKCl9cdXsxMDJBN30gKz0gIiEiOwo= -+{"version":3,"file":"extendedEscapesForAstralsInVarsAndClasses.js","sourceRoot":"","sources":["extendedEscapesForAstralsInVarsAndClasses.ts"],"names":[],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1ezEwMkE3fSArIG5ldyBGb28oKS5tZXRob2RBKCk7CgpfXHV7MTAyQTd9ICs9ICIhIjsK ++{"version":3,"file":"extendedEscapesForAstralsInVarsAndClasses.js","sourceRoot":"","sources":["extendedEscapesForAstralsInVarsAndClasses.ts"],"names":[],"mappings":"AAIA,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;IAChB,EAAE,GAAG,OAAO,CAAC;AACjB,CAAC;KACI,CAAC;IACF,SAAS,GAAG,OAAO,CAAC;AACxB,CAAC;AAED,MAAM,GAAG;IACL,SAAS,CAAS;IAClB,cAAc;QACV,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAAA,CAC7B;IACD,OAAO,GAAG;QACN,OAAO,IAAI,CAAC,EAAE,CAAC;IAAA,CAClB;CACJ;AAED,MAAM,CAAC,IAAI,GAAG,GAAG,IAAI,GAAG,EAAE,CAAC,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;AAE3D,UAAU,IAAI,GAAG,CAAC"} ++//// https://sokra.github.io/source-map-visualization#base64,aWYgKE1hdGgucmFuZG9tKCkpIHsNCiAgICDwkIqnID0gImhlbGxvIjsNCn0NCmVsc2Ugew0KICAgIFx1ezEwMkE3fSA9ICJoYWxsbyI7DQp9DQpjbGFzcyBGb28gew0KICAgIFx1ezEwMkE3fTsNCiAgICBjb25zdHJ1Y3RvcigpIHsNCiAgICAgICAgdGhpcy5cdXsxMDJBN30gPSAiIHdvcmxkIjsNCiAgICB9DQogICAgbWV0aG9kQSgpIHsNCiAgICAgICAgcmV0dXJuIHRoaXMu8JCKpzsNCiAgICB9DQp9DQpleHBvcnQgdmFyIF/wkIqnID0gbmV3IEZvbygpLlx1ezEwMkE3fSArIG5ldyBGb28oKS5tZXRob2RBKCk7DQpfXHV7MTAyQTd9ICs9ICIhIjsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWV4dGVuZGVkRXNjYXBlc0ZvckFzdHJhbHNJblZhcnNBbmR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ICAgICAgICB0aGlzLlx1ezEwMkE3fSA9ICIgd29ybGQiOwogICAgfQogICAgbWV0aG9kQSgpIHsKICAgICAgICByZXR1cm4gdGhpcy7wkIqnOwogICAgfQp9CgpleHBvcnQgdmFyIF/wkIqnID0gbmV3IEZvbygpLlx1ezEwMkE3fSArIG5ldyBGb28oKS5tZXRob2RBKCk7CgpfXHV7MTAyQTd9ICs9ICIhIjsK //// [astralAsSurrogatePair.js.map] {"version":3,"file":"astralAsSurrogatePair.js","sourceRoot":"","sources":["astralAsSurrogatePair.ts"],"names":[],"mappings":""} diff --git a/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames02(target=es2015).sourcemap.txt b/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames02(target=es2015).sourcemap.txt index 9581a71b605..96829aaa239 100644 --- a/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames02(target=es2015).sourcemap.txt +++ b/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames02(target=es2015).sourcemap.txt @@ -40,27 +40,27 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts --- >>> 𐊧 = "hello"; 1 >^^^^ -2 > ^^^^ -3 > ^^^ -4 > ^^^^^^^ -5 > ^ +2 > ^^ +3 > ^^^ +4 > ^^^^^^^ +5 > ^ 1 > > -2 > π -3 > Š§ -4 > = "hel -5 > l +2 > 𐊧 +3 > = +4 > "hello" +5 > ; 1 >Emitted(2, 5) Source(6, 5) + SourceIndex(0) -2 >Emitted(2, 9) Source(6, 6) + SourceIndex(0) -3 >Emitted(2, 12) Source(6, 9) + SourceIndex(0) -4 >Emitted(2, 19) Source(6, 16) + SourceIndex(0) -5 >Emitted(2, 20) Source(6, 17) + SourceIndex(0) +2 >Emitted(2, 7) Source(6, 7) + SourceIndex(0) +3 >Emitted(2, 10) Source(6, 10) + SourceIndex(0) +4 >Emitted(2, 17) Source(6, 17) + SourceIndex(0) +5 >Emitted(2, 18) Source(6, 18) + SourceIndex(0) --- >>>} 1 > 2 >^ 3 > ^^^^^^-> -1 >o"; +1 > > 2 >} 1 >Emitted(3, 1) Source(7, 1) + SourceIndex(0) @@ -193,29 +193,29 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 2 > ^^^^^^^ 3 > ^^^^ 4 > ^ -5 > ^^^^ -6 > ^ +5 > ^^ +6 > ^ 1->{ > 2 > return 3 > this 4 > . -5 > π -6 >  +5 > 𐊧 +6 > ; 1->Emitted(13, 9) Source(18, 9) + SourceIndex(0) 2 >Emitted(13, 16) Source(18, 16) + SourceIndex(0) 3 >Emitted(13, 20) Source(18, 20) + SourceIndex(0) 4 >Emitted(13, 21) Source(18, 21) + SourceIndex(0) -5 >Emitted(13, 25) Source(18, 22) + SourceIndex(0) -6 >Emitted(13, 26) Source(18, 23) + SourceIndex(0) +5 >Emitted(13, 23) Source(18, 23) + SourceIndex(0) +6 >Emitted(13, 24) Source(18, 24) + SourceIndex(0) --- >>> } 1 >^^^^ 2 > ^ 1 > -2 > Ч; +2 > > } -1 >Emitted(14, 5) Source(18, 23) + SourceIndex(0) +1 >Emitted(14, 5) Source(18, 24) + SourceIndex(0) 2 >Emitted(14, 6) Source(19, 6) + SourceIndex(0) --- >>>} @@ -230,61 +230,61 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 2 >^^^^^^ 3 > ^ 4 > ^^^^ -5 > ^^^^^ -6 > ^^^ -7 > ^^^^ -8 > ^^^ -9 > ^^ -10> ^ -11> ^^^^^^^^^ -12> ^^^ -13> ^^^^ -14> ^^^ -15> ^^ -16> ^ -17> ^^^^^^^ -18> ^^ -19> ^ +5 > ^^^ +6 > ^^^ +7 > ^^^^ +8 > ^^^ +9 > ^^ +10> ^ +11> ^^^^^^^^^ +12> ^^^ +13> ^^^^ +14> ^^^ +15> ^^ +16> ^ +17> ^^^^^^^ +18> ^^ +19> ^ 1-> > > 2 >export 3 > 4 > var -5 > _π -6 > Š§ -7 > = n -8 > ew -9 > Fo -10> o -11> ().\u{102 -12> A7} -13> + n -14> ew -15> Fo -16> o -17> ().meth -18> od -19> A +5 > _𐊧 +6 > = +7 > new +8 > Foo +9 > () +10> . +11> \u{102A7} +12> + +13> new +14> Foo +15> () +16> . +17> methodA +18> () +19> ; 1->Emitted(16, 1) Source(22, 1) + SourceIndex(0) 2 >Emitted(16, 7) Source(22, 7) + SourceIndex(0) 3 >Emitted(16, 8) Source(22, 8) + SourceIndex(0) 4 >Emitted(16, 12) Source(22, 12) + SourceIndex(0) -5 >Emitted(16, 17) Source(22, 14) + SourceIndex(0) -6 >Emitted(16, 20) Source(22, 17) + SourceIndex(0) -7 >Emitted(16, 24) Source(22, 21) + SourceIndex(0) -8 >Emitted(16, 27) Source(22, 24) + SourceIndex(0) -9 >Emitted(16, 29) Source(22, 26) + SourceIndex(0) -10>Emitted(16, 30) Source(22, 27) + SourceIndex(0) -11>Emitted(16, 39) Source(22, 36) + SourceIndex(0) -12>Emitted(16, 42) Source(22, 39) + SourceIndex(0) -13>Emitted(16, 46) Source(22, 43) + SourceIndex(0) -14>Emitted(16, 49) Source(22, 46) + SourceIndex(0) -15>Emitted(16, 51) Source(22, 48) + SourceIndex(0) -16>Emitted(16, 52) Source(22, 49) + SourceIndex(0) -17>Emitted(16, 59) Source(22, 56) + SourceIndex(0) -18>Emitted(16, 61) Source(22, 58) + SourceIndex(0) -19>Emitted(16, 62) Source(22, 59) + SourceIndex(0) +5 >Emitted(16, 15) Source(22, 15) + SourceIndex(0) +6 >Emitted(16, 18) Source(22, 18) + SourceIndex(0) +7 >Emitted(16, 22) Source(22, 22) + SourceIndex(0) +8 >Emitted(16, 25) Source(22, 25) + SourceIndex(0) +9 >Emitted(16, 27) Source(22, 27) + SourceIndex(0) +10>Emitted(16, 28) Source(22, 28) + SourceIndex(0) +11>Emitted(16, 37) Source(22, 37) + SourceIndex(0) +12>Emitted(16, 40) Source(22, 40) + SourceIndex(0) +13>Emitted(16, 44) Source(22, 44) + SourceIndex(0) +14>Emitted(16, 47) Source(22, 47) + SourceIndex(0) +15>Emitted(16, 49) Source(22, 49) + SourceIndex(0) +16>Emitted(16, 50) Source(22, 50) + SourceIndex(0) +17>Emitted(16, 57) Source(22, 57) + SourceIndex(0) +18>Emitted(16, 59) Source(22, 59) + SourceIndex(0) +19>Emitted(16, 60) Source(22, 60) + SourceIndex(0) --- >>>_\u{102A7} += "!"; 1 > @@ -293,7 +293,7 @@ sourceFile:extendedEscapesForAstralsInVarsAndClasses.ts 4 > ^^^ 5 > ^ 6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >(); +1 > > > 2 >_\u{102A7} diff --git a/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames02(target=es2015).sourcemap.txt.diff b/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames02(target=es2015).sourcemap.txt.diff index 880ccc77c88..ad636bf7577 100644 --- a/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames02(target=es2015).sourcemap.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames02(target=es2015).sourcemap.txt.diff @@ -1,47 +1,6 @@ --- old.unicodeEscapesInNames02(target=es2015).sourcemap.txt +++ new.unicodeEscapesInNames02(target=es2015).sourcemap.txt -@@= skipped -39, +39 lines =@@ - --- - >>> 𐊧 = "hello"; - 1 >^^^^ --2 > ^^ --3 > ^^^ --4 > ^^^^^^^ --5 > ^ -+2 > ^^^^ -+3 > ^^^ -+4 > ^^^^^^^ -+5 > ^ - 1 > - > --2 > 𐊧 --3 > = --4 > "hello" --5 > ; -+2 > π -+3 > Š§ -+4 > = "hel -+5 > l - 1 >Emitted(2, 5) Source(6, 5) + SourceIndex(0) --2 >Emitted(2, 7) Source(6, 7) + SourceIndex(0) --3 >Emitted(2, 10) Source(6, 10) + SourceIndex(0) --4 >Emitted(2, 17) Source(6, 17) + SourceIndex(0) --5 >Emitted(2, 18) Source(6, 18) + SourceIndex(0) -+2 >Emitted(2, 9) Source(6, 6) + SourceIndex(0) -+3 >Emitted(2, 12) Source(6, 9) + SourceIndex(0) -+4 >Emitted(2, 19) Source(6, 16) + SourceIndex(0) -+5 >Emitted(2, 20) Source(6, 17) + SourceIndex(0) - --- - >>>} - 1 > - 2 >^ - 3 > ^^^^^^-> --1 > -+1 >o"; - > - 2 >} - 1 >Emitted(3, 1) Source(7, 1) + SourceIndex(0) -@@= skipped -68, +68 lines =@@ +@@= skipped -107, +107 lines =@@ 1-> 2 >^^^^^^ 3 > ^^^ @@ -144,35 +103,30 @@ --- >>> return this.𐊧; 1->^^^^^^^^ - 2 > ^^^^^^^ - 3 > ^^^^ +@@= skipped -35, +38 lines =@@ 4 > ^ --5 > ^^ --6 > ^ + 5 > ^^ + 6 > ^ -1->() { -+5 > ^^^^ -+6 > ^ +1->{ > 2 > return 3 > this 4 > . --5 > 𐊧 --6 > ; + 5 > 𐊧 + 6 > ; -1->Emitted(12, 9) Source(18, 9) + SourceIndex(0) -2 >Emitted(12, 16) Source(18, 16) + SourceIndex(0) -3 >Emitted(12, 20) Source(18, 20) + SourceIndex(0) -4 >Emitted(12, 21) Source(18, 21) + SourceIndex(0) -5 >Emitted(12, 23) Source(18, 23) + SourceIndex(0) -6 >Emitted(12, 24) Source(18, 24) + SourceIndex(0) -+5 > π -+6 >  +1->Emitted(13, 9) Source(18, 9) + SourceIndex(0) +2 >Emitted(13, 16) Source(18, 16) + SourceIndex(0) +3 >Emitted(13, 20) Source(18, 20) + SourceIndex(0) +4 >Emitted(13, 21) Source(18, 21) + SourceIndex(0) -+5 >Emitted(13, 25) Source(18, 22) + SourceIndex(0) -+6 >Emitted(13, 26) Source(18, 23) + SourceIndex(0) ++5 >Emitted(13, 23) Source(18, 23) + SourceIndex(0) ++6 >Emitted(13, 24) Source(18, 24) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -182,9 +136,9 @@ -2 > } -1 >Emitted(13, 5) Source(19, 5) + SourceIndex(0) -2 >Emitted(13, 6) Source(19, 6) + SourceIndex(0) -+2 > Ч; ++2 > + > } -+1 >Emitted(14, 5) Source(18, 23) + SourceIndex(0) ++1 >Emitted(14, 5) Source(18, 24) + SourceIndex(0) +2 >Emitted(14, 6) Source(19, 6) + SourceIndex(0) --- >>>} @@ -198,60 +152,10 @@ --- >>>export var _𐊧 = new Foo().\u{102A7} + new Foo().methodA(); 1-> - 2 >^^^^^^ - 3 > ^ - 4 > ^^^^ --5 > ^^^ --6 > ^^^ --7 > ^^^^ --8 > ^^^ --9 > ^^ --10> ^ --11> ^^^^^^^^^ --12> ^^^ --13> ^^^^ --14> ^^^ --15> ^^ --16> ^ --17> ^^^^^^^ --18> ^^ --19> ^ -+5 > ^^^^^ -+6 > ^^^ -+7 > ^^^^ -+8 > ^^^ -+9 > ^^ -+10> ^ -+11> ^^^^^^^^^ -+12> ^^^ -+13> ^^^^ -+14> ^^^ -+15> ^^ -+16> ^ -+17> ^^^^^^^ -+18> ^^ -+19> ^ - 1-> - > - > - 2 >export - 3 > - 4 > var --5 > _𐊧 --6 > = --7 > new --8 > Foo --9 > () --10> . --11> \u{102A7} --12> + --13> new --14> Foo --15> () --16> . --17> methodA --18> () --19> ; +@@= skipped -71, +71 lines =@@ + 17> methodA + 18> () + 19> ; -1->Emitted(15, 1) Source(22, 1) + SourceIndex(0) -2 >Emitted(15, 7) Source(22, 7) + SourceIndex(0) -3 >Emitted(15, 8) Source(22, 8) + SourceIndex(0) @@ -271,52 +175,29 @@ -17>Emitted(15, 57) Source(22, 57) + SourceIndex(0) -18>Emitted(15, 59) Source(22, 59) + SourceIndex(0) -19>Emitted(15, 60) Source(22, 60) + SourceIndex(0) -+5 > _π -+6 > Š§ -+7 > = n -+8 > ew -+9 > Fo -+10> o -+11> ().\u{102 -+12> A7} -+13> + n -+14> ew -+15> Fo -+16> o -+17> ().meth -+18> od -+19> A +1->Emitted(16, 1) Source(22, 1) + SourceIndex(0) +2 >Emitted(16, 7) Source(22, 7) + SourceIndex(0) +3 >Emitted(16, 8) Source(22, 8) + SourceIndex(0) +4 >Emitted(16, 12) Source(22, 12) + SourceIndex(0) -+5 >Emitted(16, 17) Source(22, 14) + SourceIndex(0) -+6 >Emitted(16, 20) Source(22, 17) + SourceIndex(0) -+7 >Emitted(16, 24) Source(22, 21) + SourceIndex(0) -+8 >Emitted(16, 27) Source(22, 24) + SourceIndex(0) -+9 >Emitted(16, 29) Source(22, 26) + SourceIndex(0) -+10>Emitted(16, 30) Source(22, 27) + SourceIndex(0) -+11>Emitted(16, 39) Source(22, 36) + SourceIndex(0) -+12>Emitted(16, 42) Source(22, 39) + SourceIndex(0) -+13>Emitted(16, 46) Source(22, 43) + SourceIndex(0) -+14>Emitted(16, 49) Source(22, 46) + SourceIndex(0) -+15>Emitted(16, 51) Source(22, 48) + SourceIndex(0) -+16>Emitted(16, 52) Source(22, 49) + SourceIndex(0) -+17>Emitted(16, 59) Source(22, 56) + SourceIndex(0) -+18>Emitted(16, 61) Source(22, 58) + SourceIndex(0) -+19>Emitted(16, 62) Source(22, 59) + SourceIndex(0) ++5 >Emitted(16, 15) Source(22, 15) + SourceIndex(0) ++6 >Emitted(16, 18) Source(22, 18) + SourceIndex(0) ++7 >Emitted(16, 22) Source(22, 22) + SourceIndex(0) ++8 >Emitted(16, 25) Source(22, 25) + SourceIndex(0) ++9 >Emitted(16, 27) Source(22, 27) + SourceIndex(0) ++10>Emitted(16, 28) Source(22, 28) + SourceIndex(0) ++11>Emitted(16, 37) Source(22, 37) + SourceIndex(0) ++12>Emitted(16, 40) Source(22, 40) + SourceIndex(0) ++13>Emitted(16, 44) Source(22, 44) + SourceIndex(0) ++14>Emitted(16, 47) Source(22, 47) + SourceIndex(0) ++15>Emitted(16, 49) Source(22, 49) + SourceIndex(0) ++16>Emitted(16, 50) Source(22, 50) + SourceIndex(0) ++17>Emitted(16, 57) Source(22, 57) + SourceIndex(0) ++18>Emitted(16, 59) Source(22, 59) + SourceIndex(0) ++19>Emitted(16, 60) Source(22, 60) + SourceIndex(0) --- >>>_\u{102A7} += "!"; 1 > -@@= skipped -133, +136 lines =@@ - 4 > ^^^ - 5 > ^ - 6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> --1 > -+1 >(); - > - > - 2 >_\u{102A7} +@@= skipped -34, +34 lines =@@ 3 > += 4 > "!" 5 > ; diff --git a/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames02(target=es2015).symbols b/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames02(target=es2015).symbols index dfd78ea13e8..2a5919ded6b 100644 --- a/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames02(target=es2015).symbols +++ b/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames02(target=es2015).symbols @@ -59,6 +59,6 @@ _\u{102A7} += "!"; import { _𐊧 as \uD800\uDEA7 } from "./extendedEscapesForAstralsInVarsAndClasses.js"; >_𐊧 : Symbol((Missing), Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 21, 10)) > : Symbol((Missing), Decl(astralAsSurrogatePair.ts, 0, 8)) ->uD800 : Symbol(uD800, Decl(astralAsSurrogatePair.ts, 0, 16)) ->uDEA7 : Symbol(uDEA7, Decl(astralAsSurrogatePair.ts, 0, 22)) +>uD800 : Symbol(uD800, Decl(astralAsSurrogatePair.ts, 0, 17)) +>uDEA7 : Symbol(uDEA7, Decl(astralAsSurrogatePair.ts, 0, 23)) diff --git a/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames02(target=es2015).symbols.diff b/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames02(target=es2015).symbols.diff deleted file mode 100644 index 6d60f8da975..00000000000 --- a/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames02(target=es2015).symbols.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.unicodeEscapesInNames02(target=es2015).symbols -+++ new.unicodeEscapesInNames02(target=es2015).symbols -@@= skipped -58, +58 lines =@@ - import { _𐊧 as \uD800\uDEA7 } from "./extendedEscapesForAstralsInVarsAndClasses.js"; - >_𐊧 : Symbol((Missing), Decl(extendedEscapesForAstralsInVarsAndClasses.ts, 21, 10)) - > : Symbol((Missing), Decl(astralAsSurrogatePair.ts, 0, 8)) -->uD800 : Symbol(uD800, Decl(astralAsSurrogatePair.ts, 0, 17)) -->uDEA7 : Symbol(uDEA7, Decl(astralAsSurrogatePair.ts, 0, 23)) -+>uD800 : Symbol(uD800, Decl(astralAsSurrogatePair.ts, 0, 16)) -+>uDEA7 : Symbol(uDEA7, Decl(astralAsSurrogatePair.ts, 0, 22))