wip fixes for the new IC10Editor changes

This commit is contained in:
2025-12-05 14:31:53 -07:00
parent aee3eca4f5
commit 7a72982797
3 changed files with 25 additions and 35 deletions

View File

@@ -42,9 +42,9 @@ public static unsafe class SlangExtensions
* Rust allocation after the List is created, there is no need to Drop this memory.
* </summary>
*/
public static Line ToLine(this Vec_FfiToken_t vec, string sourceText)
public static StyledLine ToLine(this Vec_FfiToken_t vec, string sourceText)
{
var list = new Line(sourceText);
var tokens = new List<SemanticToken>();
var currentPtr = vec.ptr;
@@ -63,9 +63,8 @@ public static unsafe class SlangExtensions
0,
colIndex,
token.length,
color,
token.token_kind,
0,
color,
token.tooltip.AsString()
);
@@ -76,12 +75,12 @@ public static unsafe class SlangExtensions
semanticToken.Data = errMsg;
semanticToken.Color = ICodeFormatter.ColorError;
}
list.AddToken(semanticToken);
tokens.Add(semanticToken);
}
Ffi.free_ffi_token_vec(vec);
return list;
return new StyledLine(sourceText, tokens);
}
public static unsafe List<Diagnostic> ToList(this Vec_FfiDiagnostic_t vec)