-
Notifications
You must be signed in to change notification settings - Fork 0
API Host SourceSpan
诊断信息使用的源代码位置范围。
Source location range used by diagnostics.
命名空间:AuroraScript.Compiler。类型:struct。
Namespace:
AuroraScript.Compiler. Kind: struct.
SourceSpan 是公开宿主类型。通过下方签名选择调用方式;对运行时对象、生命周期和异常,应由宿主在边界处明确处理。
Source location range used by diagnostics.
下面是 SourceSpan 的最小使用方式。
A minimal use of
SourceSpan.
var span = new SourceSpan
{
FileName = "main.as",
StartLine = 1,
StartColumn = 1,
EndLine = 1,
EndColumn = 10
};
Console.WriteLine(span);读取 None 字段。
Use the member according to its public signature.
Parameters:
- 无。
None.
Returns
返回 SourceSpan。
Returns
SourceSpan.
调用示意
以下示例展示调用形状;将占位实例和参数替换为宿主中的实际值。
The example shows the call shape; replace placeholder instances and arguments with actual host values.
var current = SourceSpan.None;读取 StartLine 属性。
Use the member according to its public signature.
Parameters:
- 无。
None.
Returns
返回 int。
Returns
int.
调用示意
以下示例展示调用形状;将占位实例和参数替换为宿主中的实际值。
The example shows the call shape; replace placeholder instances and arguments with actual host values.
SourceSpan value = /* 从宿主 API 获取实例 */;
var current = value.StartLine;读取 StartColumn 属性。
Use the member according to its public signature.
Parameters:
- 无。
None.
Returns
返回 int。
Returns
int.
调用示意
以下示例展示调用形状;将占位实例和参数替换为宿主中的实际值。
The example shows the call shape; replace placeholder instances and arguments with actual host values.
SourceSpan value = /* 从宿主 API 获取实例 */;
var current = value.StartColumn;读取 EndLine 属性。
Use the member according to its public signature.
Parameters:
- 无。
None.
Returns
返回 int。
Returns
int.
调用示意
以下示例展示调用形状;将占位实例和参数替换为宿主中的实际值。
The example shows the call shape; replace placeholder instances and arguments with actual host values.
SourceSpan value = /* 从宿主 API 获取实例 */;
var current = value.EndLine;读取 EndColumn 属性。
Use the member according to its public signature.
Parameters:
- 无。
None.
Returns
返回 int。
Returns
int.
调用示意
以下示例展示调用形状;将占位实例和参数替换为宿主中的实际值。
The example shows the call shape; replace placeholder instances and arguments with actual host values.
SourceSpan value = /* 从宿主 API 获取实例 */;
var current = value.EndColumn;读取 Offset 属性。
Use the member according to its public signature.
Parameters:
- 无。
None.
Returns
返回 int。
Returns
int.
调用示意
以下示例展示调用形状;将占位实例和参数替换为宿主中的实际值。
The example shows the call shape; replace placeholder instances and arguments with actual host values.
SourceSpan value = /* 从宿主 API 获取实例 */;
var current = value.Offset;读取 Length 属性。
Use the member according to its public signature.
Parameters:
- 无。
None.
Returns
返回 int。
Returns
int.
调用示意
以下示例展示调用形状;将占位实例和参数替换为宿主中的实际值。
The example shows the call shape; replace placeholder instances and arguments with actual host values.
SourceSpan value = /* 从宿主 API 获取实例 */;
var current = value.Length;读取 FileName 属性。
Use the member according to its public signature.
Parameters:
- 无。
None.
Returns
返回 string。
Returns
string.
调用示意
以下示例展示调用形状;将占位实例和参数替换为宿主中的实际值。
The example shows the call shape; replace placeholder instances and arguments with actual host values.
SourceSpan value = /* 从宿主 API 获取实例 */;
var current = value.FileName;调用 ToString 完成其公开操作。
Use the member according to its public signature.
Parameters:
- 无。
None.
Returns
返回 string。
Returns
string.
调用示意
以下示例展示调用形状;将占位实例和参数替换为宿主中的实际值。
The example shows the call shape; replace placeholder instances and arguments with actual host values.
SourceSpan value = /* 从宿主 API 获取实例 */;
var result = value.ToString();AuroraScript.JIT 4.0.0 · Documentation Home · Repository · MIT License