Add trivia to AST Node (#5330)

Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
Nick Cameron
2025-02-11 18:30:14 +13:00
committed by GitHub
parent 0e9d37c0a0
commit d4d9bf6c7f
56 changed files with 119 additions and 65 deletions

View File

@ -58,6 +58,7 @@ export class KclManager {
nonCodeNodes: {}, nonCodeNodes: {},
startNodes: [], startNodes: [],
}, },
trivia: [],
} }
private _execState: ExecState = emptyExecState() private _execState: ExecState = emptyExecState()
private _programMemory: ProgramMemory = ProgramMemory.empty() private _programMemory: ProgramMemory = ProgramMemory.empty()
@ -239,6 +240,7 @@ export class KclManager {
nonCodeNodes: {}, nonCodeNodes: {},
startNodes: [], startNodes: [],
}, },
trivia: [],
} }
} }

View File

@ -128,15 +128,78 @@ describe('Testing findUniqueName', () => {
it('should find a unique name', () => { it('should find a unique name', () => {
const result = findUniqueName( const result = findUniqueName(
JSON.stringify([ JSON.stringify([
{ type: 'Identifier', name: 'yo01', start: 0, end: 0, moduleId: 0 }, {
{ type: 'Identifier', name: 'yo02', start: 0, end: 0, moduleId: 0 }, type: 'Identifier',
{ type: 'Identifier', name: 'yo03', start: 0, end: 0, moduleId: 0 }, name: 'yo01',
{ type: 'Identifier', name: 'yo04', start: 0, end: 0, moduleId: 0 }, start: 0,
{ type: 'Identifier', name: 'yo05', start: 0, end: 0, moduleId: 0 }, end: 0,
{ type: 'Identifier', name: 'yo06', start: 0, end: 0, moduleId: 0 }, moduleId: 0,
{ type: 'Identifier', name: 'yo07', start: 0, end: 0, moduleId: 0 }, trivia: [],
{ type: 'Identifier', name: 'yo08', start: 0, end: 0, moduleId: 0 }, },
{ type: 'Identifier', name: 'yo09', start: 0, end: 0, moduleId: 0 }, {
type: 'Identifier',
name: 'yo02',
start: 0,
end: 0,
moduleId: 0,
trivia: [],
},
{
type: 'Identifier',
name: 'yo03',
start: 0,
end: 0,
moduleId: 0,
trivia: [],
},
{
type: 'Identifier',
name: 'yo04',
start: 0,
end: 0,
moduleId: 0,
trivia: [],
},
{
type: 'Identifier',
name: 'yo05',
start: 0,
end: 0,
moduleId: 0,
trivia: [],
},
{
type: 'Identifier',
name: 'yo06',
start: 0,
end: 0,
moduleId: 0,
trivia: [],
},
{
type: 'Identifier',
name: 'yo07',
start: 0,
end: 0,
moduleId: 0,
trivia: [],
},
{
type: 'Identifier',
name: 'yo08',
start: 0,
end: 0,
moduleId: 0,
trivia: [],
},
{
type: 'Identifier',
name: 'yo09',
start: 0,
end: 0,
moduleId: 0,
trivia: [],
},
] satisfies Node<Identifier>[]), ] satisfies Node<Identifier>[]),
'yo', 'yo',
2 2
@ -154,6 +217,7 @@ describe('Testing addSketchTo', () => {
end: 0, end: 0,
moduleId: 0, moduleId: 0,
nonCodeMeta: { nonCodeNodes: {}, startNodes: [] }, nonCodeMeta: { nonCodeNodes: {}, startNodes: [] },
trivia: [],
}, },
'yz' 'yz'
) )

View File

@ -278,6 +278,7 @@ export function mutateObjExpProp(
start: 0, start: 0,
end: 0, end: 0,
moduleId: 0, moduleId: 0,
trivia: [],
}) })
} }
} }
@ -890,6 +891,7 @@ export function createLiteral(value: LiteralValue | number): Node<Literal> {
moduleId: 0, moduleId: 0,
value, value,
raw, raw,
trivia: [],
} }
} }
@ -899,6 +901,7 @@ export function createTagDeclarator(value: string): Node<TagDeclarator> {
start: 0, start: 0,
end: 0, end: 0,
moduleId: 0, moduleId: 0,
trivia: [],
value, value,
} }
@ -910,6 +913,7 @@ export function createIdentifier(name: string): Node<Identifier> {
start: 0, start: 0,
end: 0, end: 0,
moduleId: 0, moduleId: 0,
trivia: [],
name, name,
} }
@ -921,6 +925,7 @@ export function createPipeSubstitution(): Node<PipeSubstitution> {
start: 0, start: 0,
end: 0, end: 0,
moduleId: 0, moduleId: 0,
trivia: [],
} }
} }
@ -933,11 +938,13 @@ export function createCallExpressionStdLib(
start: 0, start: 0,
end: 0, end: 0,
moduleId: 0, moduleId: 0,
trivia: [],
callee: { callee: {
type: 'Identifier', type: 'Identifier',
start: 0, start: 0,
end: 0, end: 0,
moduleId: 0, moduleId: 0,
trivia: [],
name, name,
}, },
@ -955,11 +962,13 @@ export function createCallExpressionStdLibKw(
start: 0, start: 0,
end: 0, end: 0,
moduleId: 0, moduleId: 0,
trivia: [],
callee: { callee: {
type: 'Identifier', type: 'Identifier',
start: 0, start: 0,
end: 0, end: 0,
moduleId: 0, moduleId: 0,
trivia: [],
name, name,
}, },
@ -977,11 +986,13 @@ export function createCallExpression(
start: 0, start: 0,
end: 0, end: 0,
moduleId: 0, moduleId: 0,
trivia: [],
callee: { callee: {
type: 'Identifier', type: 'Identifier',
start: 0, start: 0,
end: 0, end: 0,
moduleId: 0, moduleId: 0,
trivia: [],
name, name,
}, },
@ -997,6 +1008,7 @@ export function createArrayExpression(
start: 0, start: 0,
end: 0, end: 0,
moduleId: 0, moduleId: 0,
trivia: [],
nonCodeMeta: nonCodeMetaEmpty(), nonCodeMeta: nonCodeMetaEmpty(),
elements, elements,
@ -1011,6 +1023,7 @@ export function createPipeExpression(
start: 0, start: 0,
end: 0, end: 0,
moduleId: 0, moduleId: 0,
trivia: [],
body, body,
nonCodeMeta: nonCodeMetaEmpty(), nonCodeMeta: nonCodeMetaEmpty(),
@ -1028,12 +1041,14 @@ export function createVariableDeclaration(
start: 0, start: 0,
end: 0, end: 0,
moduleId: 0, moduleId: 0,
trivia: [],
declaration: { declaration: {
type: 'VariableDeclarator', type: 'VariableDeclarator',
start: 0, start: 0,
end: 0, end: 0,
moduleId: 0, moduleId: 0,
trivia: [],
id: createIdentifier(varName), id: createIdentifier(varName),
init, init,
@ -1051,6 +1066,7 @@ export function createObjectExpression(properties: {
start: 0, start: 0,
end: 0, end: 0,
moduleId: 0, moduleId: 0,
trivia: [],
nonCodeMeta: nonCodeMetaEmpty(), nonCodeMeta: nonCodeMetaEmpty(),
properties: Object.entries(properties).map(([key, value]) => ({ properties: Object.entries(properties).map(([key, value]) => ({
@ -1058,6 +1074,7 @@ export function createObjectExpression(properties: {
start: 0, start: 0,
end: 0, end: 0,
moduleId: 0, moduleId: 0,
trivia: [],
key: createIdentifier(key), key: createIdentifier(key),
value, value,
@ -1074,6 +1091,7 @@ export function createUnaryExpression(
start: 0, start: 0,
end: 0, end: 0,
moduleId: 0, moduleId: 0,
trivia: [],
operator, operator,
argument, argument,
@ -1090,6 +1108,7 @@ export function createBinaryExpression([left, operator, right]: [
start: 0, start: 0,
end: 0, end: 0,
moduleId: 0, moduleId: 0,
trivia: [],
operator, operator,
left, left,

View File

@ -1954,6 +1954,7 @@ export const updateStartProfileAtArgs: SketchLineHelper['updateArgs'] = ({
startNodes: [], startNodes: [],
nonCodeNodes: [], nonCodeNodes: [],
}, },
trivia: [],
}, },
pathToNode, pathToNode,
} }
@ -2534,6 +2535,8 @@ function addTagKw(): addTagFn {
...primaryCallExp, ...primaryCallExp,
start: callExpr.node.start, start: callExpr.node.start,
end: callExpr.node.end, end: callExpr.node.end,
moduleId: callExpr.node.moduleId,
trivia: callExpr.node.trivia,
}) })
} }

View File

@ -1769,6 +1769,7 @@ mod test {
start: 0, start: 0,
end: 0, end: 0,
module_id: ModuleId::default(), module_id: ModuleId::default(),
trivia: Vec::new(),
}, },
return_type: None, return_type: None,
digest: None, digest: None,

View File

@ -41,7 +41,7 @@ pub enum Definition<'a> {
Import(NodeRef<'a, ImportStatement>), Import(NodeRef<'a, ImportStatement>),
} }
#[derive(Debug, Default, Clone, Deserialize, Serialize, PartialEq, Eq, ts_rs::TS)] #[derive(Debug, Default, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS)]
#[ts(export)] #[ts(export)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
pub struct Node<T> { pub struct Node<T> {
@ -51,6 +51,8 @@ pub struct Node<T> {
pub end: usize, pub end: usize,
#[serde(default, skip_serializing_if = "ModuleId::is_top_level")] #[serde(default, skip_serializing_if = "ModuleId::is_top_level")]
pub module_id: ModuleId, pub module_id: ModuleId,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub trivia: NodeList<NonCodeNode>,
} }
impl<T> Node<T> { impl<T> Node<T> {
@ -94,6 +96,7 @@ impl<T> Node<T> {
start, start,
end, end,
module_id, module_id,
trivia: Vec::new(),
} }
} }
@ -103,6 +106,7 @@ impl<T> Node<T> {
start: 0, start: 0,
end: 0, end: 0,
module_id: ModuleId::default(), module_id: ModuleId::default(),
trivia: Vec::new(),
} }
} }
@ -112,6 +116,7 @@ impl<T> Node<T> {
start, start,
end, end,
module_id, module_id,
trivia: Vec::new(),
}) })
} }
@ -642,6 +647,7 @@ impl From<&BodyItem> for SourceRange {
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)] #[derive(Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)]
#[ts(export)] #[ts(export)]
#[serde(tag = "type")] #[serde(tag = "type")]
#[allow(clippy::large_enum_variant)]
pub enum Expr { pub enum Expr {
Literal(BoxNode<Literal>), Literal(BoxNode<Literal>),
Identifier(BoxNode<Identifier>), Identifier(BoxNode<Identifier>),
@ -3823,6 +3829,7 @@ const cylinder = startSketchOn('-XZ')
start: 0, start: 0,
end: 0, end: 0,
module_id: ModuleId::default(), module_id: ModuleId::default(),
trivia: Vec::new(),
}, },
return_type: None, return_type: None,
digest: None, digest: None,
@ -3852,6 +3859,7 @@ const cylinder = startSketchOn('-XZ')
start: 0, start: 0,
end: 0, end: 0,
module_id: ModuleId::default(), module_id: ModuleId::default(),
trivia: Vec::new(),
}, },
return_type: None, return_type: None,
digest: None, digest: None,
@ -3893,6 +3901,7 @@ const cylinder = startSketchOn('-XZ')
start: 0, start: 0,
end: 0, end: 0,
module_id: ModuleId::default(), module_id: ModuleId::default(),
trivia: Vec::new(),
}, },
return_type: None, return_type: None,
digest: None, digest: None,

View File

@ -308,6 +308,7 @@ fn annotation(i: &mut TokenSlice) -> PResult<Node<NonCodeNode>> {
value, value,
digest: None, digest: None,
}, },
trivia: Vec::new(),
}), }),
comma_sep, comma_sep,
) )
@ -426,6 +427,7 @@ fn pipe_expression(i: &mut TokenSlice) -> PResult<Node<PipeExpression>> {
non_code_meta, non_code_meta,
digest: None, digest: None,
}, },
trivia: Vec::new(),
}) })
} }
@ -828,6 +830,7 @@ fn object_property_same_key_and_val(i: &mut TokenSlice) -> PResult<Node<ObjectPr
key, key,
digest: None, digest: None,
}, },
trivia: Vec::new(),
}) })
} }
@ -856,6 +859,7 @@ fn object_property(i: &mut TokenSlice) -> PResult<Node<ObjectProperty>> {
value: expr, value: expr,
digest: None, digest: None,
}, },
trivia: Vec::new(),
}; };
if sep.token_type == TokenType::Colon { if sep.token_type == TokenType::Colon {
@ -1786,6 +1790,7 @@ fn return_stmt(i: &mut TokenSlice) -> PResult<Node<ReturnStatement>> {
end: argument.end(), end: argument.end(),
module_id: ret.module_id, module_id: ret.module_id,
inner: ReturnStatement { argument, digest: None }, inner: ReturnStatement { argument, digest: None },
trivia: Vec::new(),
}) })
} }
@ -2012,11 +2017,13 @@ fn declaration(i: &mut TokenSlice) -> PResult<BoxNode<VariableDeclaration>> {
init: val, init: val,
digest: None, digest: None,
}, },
trivia: Vec::new(),
}, },
visibility, visibility,
kind, kind,
digest: None, digest: None,
}, },
trivia: Vec::new(),
})) }))
} }
@ -2222,6 +2229,7 @@ fn unary_expression(i: &mut TokenSlice) -> PResult<Node<UnaryExpression>> {
argument, argument,
digest: None, digest: None,
}, },
trivia: Vec::new(),
}) })
} }
@ -2302,6 +2310,7 @@ fn expression_stmt(i: &mut TokenSlice) -> PResult<Node<ExpressionStatement>> {
expression: val, expression: val,
digest: None, digest: None,
}, },
trivia: Vec::new(),
}) })
} }
@ -2741,6 +2750,7 @@ fn fn_call(i: &mut TokenSlice) -> PResult<Node<CallExpression>> {
arguments: args, arguments: args,
digest: None, digest: None,
}, },
trivia: Vec::new(),
}) })
} }
@ -2770,6 +2780,7 @@ fn fn_call_kw(i: &mut TokenSlice) -> PResult<Node<CallExpressionKw>> {
arguments: args, arguments: args,
digest: None, digest: None,
}, },
trivia: Vec::new(),
}) })
} }

View File

@ -1,8 +1,6 @@
--- ---
source: kcl/src/parsing/parser.rs source: kcl/src/parsing/parser.rs
assertion_line: 4521
expression: actual expression: actual
snapshot_kind: text
--- ---
{ {
"body": [ "body": [

View File

@ -1,8 +1,6 @@
--- ---
source: kcl/src/parsing/parser.rs source: kcl/src/parsing/parser.rs
assertion_line: 4522
expression: actual expression: actual
snapshot_kind: text
--- ---
{ {
"body": [ "body": [

View File

@ -1,8 +1,6 @@
--- ---
source: kcl/src/parsing/parser.rs source: kcl/src/parsing/parser.rs
assertion_line: 4523
expression: actual expression: actual
snapshot_kind: text
--- ---
{ {
"body": [ "body": [

View File

@ -1,8 +1,6 @@
--- ---
source: kcl/src/parsing/parser.rs source: kcl/src/parsing/parser.rs
assertion_line: 4524
expression: actual expression: actual
snapshot_kind: text
--- ---
{ {
"body": [ "body": [

View File

@ -1,8 +1,6 @@
--- ---
source: kcl/src/parsing/parser.rs source: kcl/src/parsing/parser.rs
assertion_line: 4525
expression: actual expression: actual
snapshot_kind: text
--- ---
{ {
"body": [ "body": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/parsing/parser.rs source: kcl/src/parsing/parser.rs
expression: actual expression: actual
snapshot_kind: text
--- ---
{ {
"body": [ "body": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/parsing/parser.rs source: kcl/src/parsing/parser.rs
expression: actual expression: actual
snapshot_kind: text
--- ---
{ {
"body": [ "body": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing angled_line.kcl description: Program memory after executing angled_line.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Result of parsing artifact_graph_example_code1.kcl description: Result of parsing artifact_graph_example_code1.kcl
snapshot_kind: text
--- ---
{ {
"Ok": { "Ok": {

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing artifact_graph_example_code1.kcl description: Program memory after executing artifact_graph_example_code1.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Result of parsing artifact_graph_example_code_no_3d.kcl description: Result of parsing artifact_graph_example_code_no_3d.kcl
snapshot_kind: text
--- ---
{ {
"Ok": { "Ok": {

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing artifact_graph_example_code_no_3d.kcl description: Program memory after executing artifact_graph_example_code_no_3d.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Result of parsing artifact_graph_example_code_offset_planes.kcl description: Result of parsing artifact_graph_example_code_offset_planes.kcl
snapshot_kind: text
--- ---
{ {
"Ok": { "Ok": {

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Result of parsing artifact_graph_sketch_on_face_etc.kcl description: Result of parsing artifact_graph_sketch_on_face_etc.kcl
snapshot_kind: text
--- ---
{ {
"Ok": { "Ok": {

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing artifact_graph_sketch_on_face_etc.kcl description: Program memory after executing artifact_graph_sketch_on_face_etc.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing basic_fillet_cube_close_opposite.kcl description: Program memory after executing basic_fillet_cube_close_opposite.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing basic_fillet_cube_end.kcl description: Program memory after executing basic_fillet_cube_end.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing basic_fillet_cube_next_adjacent.kcl description: Program memory after executing basic_fillet_cube_next_adjacent.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing basic_fillet_cube_previous_adjacent.kcl description: Program memory after executing basic_fillet_cube_previous_adjacent.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing basic_fillet_cube_start.kcl description: Program memory after executing basic_fillet_cube_start.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing big_number_angle_to_match_length_x.kcl description: Program memory after executing big_number_angle_to_match_length_x.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing big_number_angle_to_match_length_y.kcl description: Program memory after executing big_number_angle_to_match_length_y.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing cube.kcl description: Program memory after executing cube.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Result of parsing cube_with_error.kcl description: Result of parsing cube_with_error.kcl
snapshot_kind: text
--- ---
{ {
"Ok": { "Ok": {

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Result of parsing fillet-and-shell.kcl description: Result of parsing fillet-and-shell.kcl
snapshot_kind: text
--- ---
{ {
"Ok": { "Ok": {

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing fillet-and-shell.kcl description: Program memory after executing fillet-and-shell.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing function_sketch.kcl description: Program memory after executing function_sketch.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing function_sketch_with_position.kcl description: Program memory after executing function_sketch_with_position.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Result of parsing import_cycle1.kcl description: Result of parsing import_cycle1.kcl
snapshot_kind: text
--- ---
{ {
"Ok": { "Ok": {

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Result of parsing import_function_not_sketch.kcl description: Result of parsing import_function_not_sketch.kcl
snapshot_kind: text
--- ---
{ {
"Ok": { "Ok": {

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing import_function_not_sketch.kcl description: Program memory after executing import_function_not_sketch.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing import_side_effect.kcl description: Program memory after executing import_side_effect.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Result of parsing import_whole.kcl description: Result of parsing import_whole.kcl
snapshot_kind: text
--- ---
{ {
"Ok": { "Ok": {

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing pentagon_fillet_sugar.kcl description: Program memory after executing pentagon_fillet_sugar.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Result of parsing pipe_as_arg.kcl description: Result of parsing pipe_as_arg.kcl
snapshot_kind: text
--- ---
{ {
"Ok": { "Ok": {

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing pipe_as_arg.kcl description: Program memory after executing pipe_as_arg.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Result of parsing poop_chute.kcl description: Result of parsing poop_chute.kcl
snapshot_kind: text
--- ---
{ {
"Ok": { "Ok": {

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing poop_chute.kcl description: Program memory after executing poop_chute.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing riddle_small.kcl description: Program memory after executing riddle_small.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing sketch-on-chamfer-two-times-different-order.kcl description: Program memory after executing sketch-on-chamfer-two-times-different-order.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing sketch-on-chamfer-two-times.kcl description: Program memory after executing sketch-on-chamfer-two-times.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing sketch_in_object.kcl description: Program memory after executing sketch_in_object.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing sketch_on_face.kcl description: Program memory after executing sketch_on_face.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing sketch_on_face_after_fillets_referencing_face.kcl description: Program memory after executing sketch_on_face_after_fillets_referencing_face.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing sketch_on_face_circle_tagged.kcl description: Program memory after executing sketch_on_face_circle_tagged.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing sketch_on_face_end.kcl description: Program memory after executing sketch_on_face_end.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing sketch_on_face_end_negative_extrude.kcl description: Program memory after executing sketch_on_face_end_negative_extrude.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [

View File

@ -1,7 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
description: Program memory after executing sketch_on_face_start.kcl description: Program memory after executing sketch_on_face_start.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [

View File

@ -1,8 +1,6 @@
--- ---
source: kcl/src/simulation_tests.rs source: kcl/src/simulation_tests.rs
assertion_line: 92
description: Program memory after executing tan_arc_x_line.kcl description: Program memory after executing tan_arc_x_line.kcl
snapshot_kind: text
--- ---
{ {
"environments": [ "environments": [