Support comments on attributes (#5850)
Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
@ -53,6 +53,12 @@ pub struct Node<T> {
|
||||
pub module_id: ModuleId,
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
pub outer_attrs: NodeList<Annotation>,
|
||||
// Some comments are kept here, some are kept in NonCodeMeta, and some are ignored. See how each
|
||||
// node is parsed to check for certain. In any case, only comments which are strongly associated
|
||||
// with an item are kept here.
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
pub pre_comments: Vec<String>,
|
||||
pub comment_start: usize,
|
||||
}
|
||||
|
||||
impl<T: JsonSchema> schemars::JsonSchema for Node<T> {
|
||||
@ -85,6 +91,20 @@ impl<T> Node<T> {
|
||||
end,
|
||||
module_id,
|
||||
outer_attrs: Vec::new(),
|
||||
pre_comments: Vec::new(),
|
||||
comment_start: start,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new_node(start: usize, end: usize, module_id: ModuleId, inner: T) -> Self {
|
||||
Self {
|
||||
inner,
|
||||
start,
|
||||
end,
|
||||
module_id,
|
||||
outer_attrs: Vec::new(),
|
||||
pre_comments: Vec::new(),
|
||||
comment_start: start,
|
||||
}
|
||||
}
|
||||
|
||||
@ -95,6 +115,8 @@ impl<T> Node<T> {
|
||||
end: 0,
|
||||
module_id: ModuleId::default(),
|
||||
outer_attrs: Vec::new(),
|
||||
pre_comments: Vec::new(),
|
||||
comment_start: 0,
|
||||
}
|
||||
}
|
||||
|
||||
@ -105,6 +127,8 @@ impl<T> Node<T> {
|
||||
end,
|
||||
module_id,
|
||||
outer_attrs: Vec::new(),
|
||||
pre_comments: Vec::new(),
|
||||
comment_start: start,
|
||||
})
|
||||
}
|
||||
|
||||
@ -133,8 +157,15 @@ impl<T> Node<T> {
|
||||
end: self.end,
|
||||
module_id: self.module_id,
|
||||
outer_attrs: self.outer_attrs,
|
||||
pre_comments: self.pre_comments,
|
||||
comment_start: self.comment_start,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_comments(&mut self, comments: Vec<String>, start: usize) {
|
||||
self.pre_comments = comments;
|
||||
self.comment_start = start;
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> Deref for Node<T> {
|
||||
@ -373,6 +404,26 @@ impl Program {
|
||||
if self.non_code_meta.in_comment(pos) {
|
||||
return true;
|
||||
}
|
||||
|
||||
for item in &self.body {
|
||||
let r = item.comment_range();
|
||||
eprintln!("item {r:?}");
|
||||
if pos >= r.0 && pos < r.1 {
|
||||
return true;
|
||||
}
|
||||
if pos < r.0 {
|
||||
break;
|
||||
}
|
||||
}
|
||||
for n in &self.inner_attrs {
|
||||
if pos >= n.comment_start && pos < n.start {
|
||||
return true;
|
||||
}
|
||||
if pos < n.comment_start {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
let item = self.get_body_item_for_position(pos);
|
||||
|
||||
// Recurse over the item.
|
||||
@ -660,6 +711,36 @@ impl BodyItem {
|
||||
BodyItem::ReturnStatement(node) => &mut node.outer_attrs,
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn set_comments(&mut self, comments: Vec<String>, start: usize) {
|
||||
match self {
|
||||
BodyItem::ImportStatement(node) => node.set_comments(comments, start),
|
||||
BodyItem::ExpressionStatement(node) => node.set_comments(comments, start),
|
||||
BodyItem::VariableDeclaration(node) => node.set_comments(comments, start),
|
||||
BodyItem::TypeDeclaration(node) => node.set_comments(comments, start),
|
||||
BodyItem::ReturnStatement(node) => node.set_comments(comments, start),
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn get_comments(&self) -> &[String] {
|
||||
match self {
|
||||
BodyItem::ImportStatement(node) => &node.pre_comments,
|
||||
BodyItem::ExpressionStatement(node) => &node.pre_comments,
|
||||
BodyItem::VariableDeclaration(node) => &node.pre_comments,
|
||||
BodyItem::TypeDeclaration(node) => &node.pre_comments,
|
||||
BodyItem::ReturnStatement(node) => &node.pre_comments,
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn comment_range(&self) -> (usize, usize) {
|
||||
match self {
|
||||
BodyItem::ImportStatement(node) => (node.comment_start, node.start),
|
||||
BodyItem::ExpressionStatement(node) => (node.comment_start, node.start),
|
||||
BodyItem::VariableDeclaration(node) => (node.comment_start, node.start),
|
||||
BodyItem::TypeDeclaration(node) => (node.comment_start, node.start),
|
||||
BodyItem::ReturnStatement(node) => (node.comment_start, node.start),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<BodyItem> for SourceRange {
|
||||
@ -1171,6 +1252,23 @@ pub enum CommentStyle {
|
||||
Block,
|
||||
}
|
||||
|
||||
impl CommentStyle {
|
||||
pub fn render_comment(&self, comment: &str) -> String {
|
||||
match self {
|
||||
CommentStyle::Line => {
|
||||
let comment = comment.trim();
|
||||
let mut result = "//".to_owned();
|
||||
if !comment.is_empty() && !comment.starts_with('/') {
|
||||
result.push(' ');
|
||||
}
|
||||
result.push_str(comment);
|
||||
result
|
||||
}
|
||||
CommentStyle::Block => format!("/* {comment} */"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)]
|
||||
#[ts(export)]
|
||||
#[serde(tag = "type", rename_all = "camelCase")]
|
||||
@ -1186,7 +1284,7 @@ pub enum NonCodeValue {
|
||||
},
|
||||
/// A block comment.
|
||||
/// An example of this is the following:
|
||||
/// ```python,no_run
|
||||
/// ```no_run
|
||||
/// /* This is a
|
||||
/// block comment */
|
||||
/// 1 + 1
|
||||
@ -3890,7 +3988,6 @@ startSketchOn('XY')"#;
|
||||
formatted,
|
||||
r#"@settings(defaultLengthUnit = mm)
|
||||
|
||||
|
||||
startSketchOn('XY')
|
||||
"#
|
||||
);
|
||||
@ -3925,6 +4022,7 @@ startSketchOn('XY')
|
||||
assert_eq!(
|
||||
formatted,
|
||||
r#"@settings(defaultLengthUnit = mm)
|
||||
|
||||
startSketchOn('XY')
|
||||
"#
|
||||
);
|
||||
|
@ -300,16 +300,17 @@ fn annotation(i: &mut TokenSlice) -> PResult<Node<Annotation>> {
|
||||
terminated(one_of((TokenType::Operator, "=")), opt(whitespace)),
|
||||
expression,
|
||||
)
|
||||
.map(|(key, value)| Node {
|
||||
start: key.start,
|
||||
end: value.end(),
|
||||
module_id: key.module_id,
|
||||
inner: ObjectProperty {
|
||||
key,
|
||||
value,
|
||||
digest: None,
|
||||
},
|
||||
outer_attrs: Vec::new(),
|
||||
.map(|(key, value)| {
|
||||
Node::new_node(
|
||||
key.start,
|
||||
value.end(),
|
||||
key.module_id,
|
||||
ObjectProperty {
|
||||
key,
|
||||
value,
|
||||
digest: None,
|
||||
},
|
||||
)
|
||||
}),
|
||||
comma_sep,
|
||||
)
|
||||
@ -417,17 +418,16 @@ fn pipe_expression(i: &mut TokenSlice) -> PResult<Node<PipeExpression>> {
|
||||
non_code_meta.insert(code_count, nc);
|
||||
}
|
||||
}
|
||||
Ok(Node {
|
||||
start: values.first().unwrap().start(),
|
||||
end: values.last().unwrap().end().max(max_noncode_end),
|
||||
module_id: values.first().unwrap().module_id(),
|
||||
inner: PipeExpression {
|
||||
Ok(Node::new_node(
|
||||
values.first().unwrap().start(),
|
||||
values.last().unwrap().end().max(max_noncode_end),
|
||||
values.first().unwrap().module_id(),
|
||||
PipeExpression {
|
||||
body: values,
|
||||
non_code_meta,
|
||||
digest: None,
|
||||
},
|
||||
outer_attrs: Vec::new(),
|
||||
})
|
||||
))
|
||||
}
|
||||
|
||||
fn bool_value(i: &mut TokenSlice) -> PResult<BoxNode<Literal>> {
|
||||
@ -858,17 +858,16 @@ fn array_end_start(i: &mut TokenSlice) -> PResult<Node<ArrayRangeExpression>> {
|
||||
fn object_property_same_key_and_val(i: &mut TokenSlice) -> PResult<Node<ObjectProperty>> {
|
||||
let key = nameable_identifier.context(expected("the property's key (the name or identifier of the property), e.g. in 'height = 4', 'height' is the property key")).parse_next(i)?;
|
||||
ignore_whitespace(i);
|
||||
Ok(Node {
|
||||
start: key.start,
|
||||
end: key.end,
|
||||
module_id: key.module_id,
|
||||
inner: ObjectProperty {
|
||||
Ok(Node::new_node(
|
||||
key.start,
|
||||
key.end,
|
||||
key.module_id,
|
||||
ObjectProperty {
|
||||
value: Expr::Identifier(Box::new(key.clone())),
|
||||
key,
|
||||
digest: None,
|
||||
},
|
||||
outer_attrs: Vec::new(),
|
||||
})
|
||||
))
|
||||
}
|
||||
|
||||
fn object_property(i: &mut TokenSlice) -> PResult<Node<ObjectProperty>> {
|
||||
@ -899,17 +898,16 @@ fn object_property(i: &mut TokenSlice) -> PResult<Node<ObjectProperty>> {
|
||||
}
|
||||
};
|
||||
|
||||
let result = Node {
|
||||
start: key.start,
|
||||
end: expr.end(),
|
||||
module_id: key.module_id,
|
||||
inner: ObjectProperty {
|
||||
let result = Node::new_node(
|
||||
key.start,
|
||||
expr.end(),
|
||||
key.module_id,
|
||||
ObjectProperty {
|
||||
key,
|
||||
value: expr,
|
||||
digest: None,
|
||||
},
|
||||
outer_attrs: Vec::new(),
|
||||
};
|
||||
);
|
||||
|
||||
if sep.token_type == TokenType::Colon {
|
||||
ParseContext::warn(
|
||||
@ -1552,14 +1550,57 @@ fn function_body(i: &mut TokenSlice) -> PResult<Node<Program>> {
|
||||
let mut inner_attrs = Vec::new();
|
||||
let mut pending_attrs = Vec::new();
|
||||
let mut non_code_meta = NonCodeMeta::default();
|
||||
let mut pending_non_code: Vec<Node<NonCodeNode>> = Vec::new();
|
||||
let mut end = 0;
|
||||
let mut start = leading_whitespace_start;
|
||||
|
||||
macro_rules! handle_pending_non_code {
|
||||
($node: ident) => {
|
||||
if !pending_non_code.is_empty() {
|
||||
let start = pending_non_code[0].start;
|
||||
let force_disoc = matches!(
|
||||
&pending_non_code.last().unwrap().inner.value,
|
||||
NonCodeValue::NewLine
|
||||
);
|
||||
let mut comments = Vec::new();
|
||||
for nc in pending_non_code {
|
||||
match nc.inner.value {
|
||||
NonCodeValue::BlockComment { value, style } if !force_disoc => {
|
||||
comments.push(style.render_comment(&value));
|
||||
}
|
||||
NonCodeValue::NewLineBlockComment { value, style } if !force_disoc => {
|
||||
if comments.is_empty() && nc.start != 0 {
|
||||
comments.push(String::new());
|
||||
comments.push(String::new());
|
||||
}
|
||||
comments.push(style.render_comment(&value));
|
||||
}
|
||||
NonCodeValue::NewLine if !force_disoc && !comments.is_empty() => {
|
||||
comments.push(String::new());
|
||||
comments.push(String::new());
|
||||
}
|
||||
_ => {
|
||||
if body.is_empty() {
|
||||
non_code_meta.start_nodes.push(nc);
|
||||
} else {
|
||||
non_code_meta.insert(body.len() - 1, nc);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$node.set_comments(comments, start);
|
||||
pending_non_code = Vec::new();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
for thing_in_body in things_within_body {
|
||||
match thing_in_body {
|
||||
WithinFunction::Annotation(attr) => {
|
||||
WithinFunction::Annotation(mut attr) => {
|
||||
if start.is_none() {
|
||||
start = Some((attr.start, attr.module_id))
|
||||
}
|
||||
handle_pending_non_code!(attr);
|
||||
if attr.is_inner() {
|
||||
inner_attrs.push(attr);
|
||||
} else {
|
||||
@ -1575,10 +1616,11 @@ fn function_body(i: &mut TokenSlice) -> PResult<Node<Program>> {
|
||||
b.set_attrs(pending_attrs);
|
||||
pending_attrs = Vec::new();
|
||||
}
|
||||
handle_pending_non_code!(b);
|
||||
body.push(b);
|
||||
if let Some(nc) = maybe_noncode {
|
||||
end = nc.end;
|
||||
non_code_meta.insert(body.len() - 1, nc);
|
||||
pending_non_code.push(nc);
|
||||
}
|
||||
}
|
||||
WithinFunction::NonCode(nc) => {
|
||||
@ -1586,11 +1628,7 @@ fn function_body(i: &mut TokenSlice) -> PResult<Node<Program>> {
|
||||
start = Some((nc.start, nc.module_id));
|
||||
}
|
||||
end = nc.end;
|
||||
if body.is_empty() {
|
||||
non_code_meta.start_nodes.push(nc);
|
||||
} else {
|
||||
non_code_meta.insert(body.len() - 1, nc);
|
||||
}
|
||||
pending_non_code.push(nc);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1614,6 +1652,15 @@ fn function_body(i: &mut TokenSlice) -> PResult<Node<Program>> {
|
||||
.into(),
|
||||
));
|
||||
}
|
||||
|
||||
for nc in pending_non_code {
|
||||
if body.is_empty() {
|
||||
non_code_meta.start_nodes.push(nc);
|
||||
} else {
|
||||
non_code_meta.insert(body.len() - 1, nc);
|
||||
}
|
||||
}
|
||||
|
||||
// Safe to unwrap `body.first()` because `body` is `separated1` therefore guaranteed
|
||||
// to have len >= 1.
|
||||
let end_ws = opt(whitespace)
|
||||
@ -1922,13 +1969,12 @@ fn return_stmt(i: &mut TokenSlice) -> PResult<Node<ReturnStatement>> {
|
||||
.parse_next(i)?;
|
||||
require_whitespace(i)?;
|
||||
let argument = expression(i)?;
|
||||
Ok(Node {
|
||||
start: ret.start,
|
||||
end: argument.end(),
|
||||
module_id: ret.module_id,
|
||||
inner: ReturnStatement { argument, digest: None },
|
||||
outer_attrs: Vec::new(),
|
||||
})
|
||||
Ok(Node::new_node(
|
||||
ret.start,
|
||||
argument.end(),
|
||||
ret.module_id,
|
||||
ReturnStatement { argument, digest: None },
|
||||
))
|
||||
}
|
||||
|
||||
/// Parse a KCL expression.
|
||||
@ -2134,28 +2180,27 @@ fn declaration(i: &mut TokenSlice) -> PResult<BoxNode<VariableDeclaration>> {
|
||||
.map_err(|e| e.cut())?;
|
||||
|
||||
let end = val.end();
|
||||
Ok(Box::new(Node {
|
||||
start,
|
||||
end,
|
||||
module_id: id.module_id,
|
||||
inner: VariableDeclaration {
|
||||
declaration: Node {
|
||||
start: id.start,
|
||||
let module_id = id.module_id;
|
||||
Ok(Node::boxed(
|
||||
VariableDeclaration {
|
||||
declaration: Node::new_node(
|
||||
id.start,
|
||||
end,
|
||||
module_id: id.module_id,
|
||||
inner: VariableDeclarator {
|
||||
module_id,
|
||||
VariableDeclarator {
|
||||
id,
|
||||
init: val,
|
||||
digest: None,
|
||||
},
|
||||
outer_attrs: Vec::new(),
|
||||
},
|
||||
),
|
||||
visibility,
|
||||
kind,
|
||||
digest: None,
|
||||
},
|
||||
outer_attrs: Vec::new(),
|
||||
}))
|
||||
start,
|
||||
end,
|
||||
module_id,
|
||||
))
|
||||
}
|
||||
|
||||
fn ty_decl(i: &mut TokenSlice) -> PResult<BoxNode<TypeDeclaration>> {
|
||||
@ -2183,18 +2228,18 @@ fn ty_decl(i: &mut TokenSlice) -> PResult<BoxNode<TypeDeclaration>> {
|
||||
None
|
||||
};
|
||||
|
||||
let result = Box::new(Node {
|
||||
start,
|
||||
end,
|
||||
module_id: name.module_id,
|
||||
outer_attrs: Vec::new(),
|
||||
inner: TypeDeclaration {
|
||||
let module_id = name.module_id;
|
||||
let result = Node::boxed(
|
||||
TypeDeclaration {
|
||||
name,
|
||||
args,
|
||||
visibility,
|
||||
digest: None,
|
||||
},
|
||||
});
|
||||
start,
|
||||
end,
|
||||
module_id,
|
||||
);
|
||||
|
||||
ParseContext::warn(CompilationError::err(
|
||||
result.as_source_range(),
|
||||
@ -2374,17 +2419,16 @@ fn unary_expression(i: &mut TokenSlice) -> PResult<Node<UnaryExpression>> {
|
||||
.context(expected("a unary expression, e.g. -x or -3"))
|
||||
.parse_next(i)?;
|
||||
let argument = operand.parse_next(i)?;
|
||||
Ok(Node {
|
||||
start: op_token.start,
|
||||
end: argument.end(),
|
||||
module_id: op_token.module_id,
|
||||
inner: UnaryExpression {
|
||||
Ok(Node::new_node(
|
||||
op_token.start,
|
||||
argument.end(),
|
||||
op_token.module_id,
|
||||
UnaryExpression {
|
||||
operator,
|
||||
argument,
|
||||
digest: None,
|
||||
},
|
||||
outer_attrs: Vec::new(),
|
||||
})
|
||||
))
|
||||
}
|
||||
|
||||
/// Consume tokens that make up a binary expression, but don't actually return them.
|
||||
@ -2456,16 +2500,15 @@ fn expression_stmt(i: &mut TokenSlice) -> PResult<Node<ExpressionStatement>> {
|
||||
"an expression (i.e. a value, or an algorithm for calculating one), e.g. 'x + y' or '3' or 'width * 2'",
|
||||
))
|
||||
.parse_next(i)?;
|
||||
Ok(Node {
|
||||
start: val.start(),
|
||||
end: val.end(),
|
||||
module_id: val.module_id(),
|
||||
inner: ExpressionStatement {
|
||||
Ok(Node::new_node(
|
||||
val.start(),
|
||||
val.end(),
|
||||
val.module_id(),
|
||||
ExpressionStatement {
|
||||
expression: val,
|
||||
digest: None,
|
||||
},
|
||||
outer_attrs: Vec::new(),
|
||||
})
|
||||
))
|
||||
}
|
||||
|
||||
/// Parse the given brace symbol.
|
||||
@ -2889,17 +2932,16 @@ fn fn_call(i: &mut TokenSlice) -> PResult<Node<CallExpression>> {
|
||||
}
|
||||
let end = preceded(opt(whitespace), close_paren).parse_next(i)?.end;
|
||||
|
||||
Ok(Node {
|
||||
start: fn_name.start,
|
||||
Ok(Node::new_node(
|
||||
fn_name.start,
|
||||
end,
|
||||
module_id: fn_name.module_id,
|
||||
inner: CallExpression {
|
||||
fn_name.module_id,
|
||||
CallExpression {
|
||||
callee: fn_name,
|
||||
arguments: args,
|
||||
digest: None,
|
||||
},
|
||||
outer_attrs: Vec::new(),
|
||||
})
|
||||
))
|
||||
}
|
||||
|
||||
fn fn_call_kw(i: &mut TokenSlice) -> PResult<Node<CallExpressionKw>> {
|
||||
@ -2971,19 +3013,18 @@ fn fn_call_kw(i: &mut TokenSlice) -> PResult<Node<CallExpressionKw>> {
|
||||
non_code_nodes,
|
||||
..Default::default()
|
||||
};
|
||||
Ok(Node {
|
||||
start: fn_name.start,
|
||||
Ok(Node::new_node(
|
||||
fn_name.start,
|
||||
end,
|
||||
module_id: fn_name.module_id,
|
||||
inner: CallExpressionKw {
|
||||
fn_name.module_id,
|
||||
CallExpressionKw {
|
||||
callee: fn_name,
|
||||
unlabeled: initial_unlabeled_arg,
|
||||
arguments: args,
|
||||
digest: None,
|
||||
non_code_meta,
|
||||
},
|
||||
outer_attrs: Vec::new(),
|
||||
})
|
||||
))
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
@ -3094,18 +3135,18 @@ mod tests {
|
||||
a = 1
|
||||
// comment 1
|
||||
b = 2
|
||||
// comment 2
|
||||
/// comment 2
|
||||
return 1
|
||||
}"#;
|
||||
let tokens = crate::parsing::token::lex(test_program, ModuleId::default()).unwrap();
|
||||
let expr = function_decl.map(|t| t.0).parse_next(&mut tokens.as_slice()).unwrap();
|
||||
assert_eq!(expr.params, vec![]);
|
||||
let comment_start = expr.body.non_code_meta.start_nodes.first().unwrap();
|
||||
let comment0 = &expr.body.non_code_meta.non_code_nodes.get(&0).unwrap()[0];
|
||||
let comment1 = &expr.body.non_code_meta.non_code_nodes.get(&1).unwrap()[0];
|
||||
assert_eq!(comment_start.value(), "comment 0");
|
||||
assert_eq!(comment0.value(), "comment 1");
|
||||
assert_eq!(comment1.value(), "comment 2");
|
||||
let comment_start = expr.body.body[0].get_comments();
|
||||
let comment0 = expr.body.body[1].get_comments();
|
||||
let comment1 = expr.body.body[2].get_comments();
|
||||
assert_eq!(comment_start, vec!["// comment 0".to_owned()]);
|
||||
assert_eq!(comment0, vec!["// comment 1".to_owned()]);
|
||||
assert_eq!(comment1, vec!["/// comment 2".to_owned()]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
@ -3186,61 +3227,16 @@ mySk1 = startSketchOn(XY)
|
||||
let tokens = crate::parsing::token::lex(test_program, module_id).unwrap();
|
||||
let expr = function_decl.map(|t| t.0).parse_next(&mut tokens.as_slice()).unwrap();
|
||||
assert_eq!(
|
||||
expr,
|
||||
Node::new(
|
||||
FunctionExpression {
|
||||
params: Default::default(),
|
||||
body: Node::new(
|
||||
Program {
|
||||
body: vec![BodyItem::ReturnStatement(Node::new(
|
||||
ReturnStatement {
|
||||
argument: Expr::Literal(Box::new(Node::new(
|
||||
Literal {
|
||||
value: LiteralValue::Number {
|
||||
value: 2.0,
|
||||
suffix: NumericSuffix::None
|
||||
},
|
||||
raw: "2".to_owned(),
|
||||
digest: None,
|
||||
},
|
||||
29,
|
||||
30,
|
||||
module_id,
|
||||
))),
|
||||
digest: None,
|
||||
},
|
||||
22,
|
||||
30,
|
||||
module_id,
|
||||
))],
|
||||
non_code_meta: NonCodeMeta {
|
||||
non_code_nodes: Default::default(),
|
||||
start_nodes: vec![Node::new(
|
||||
NonCodeNode {
|
||||
value: NonCodeValue::NewLine,
|
||||
digest: None
|
||||
},
|
||||
4,
|
||||
22,
|
||||
module_id,
|
||||
)],
|
||||
digest: None,
|
||||
},
|
||||
inner_attrs: Vec::new(),
|
||||
shebang: None,
|
||||
digest: None,
|
||||
},
|
||||
4,
|
||||
44,
|
||||
module_id,
|
||||
),
|
||||
return_type: None,
|
||||
digest: None,
|
||||
expr.body.non_code_meta.start_nodes,
|
||||
vec![Node::new(
|
||||
NonCodeNode {
|
||||
value: NonCodeValue::NewLine,
|
||||
digest: None
|
||||
},
|
||||
0,
|
||||
44,
|
||||
4,
|
||||
22,
|
||||
module_id,
|
||||
)
|
||||
)]
|
||||
);
|
||||
}
|
||||
|
||||
@ -3282,22 +3278,10 @@ mySk1 = startSketchOn(XY)
|
||||
|
||||
let module_id = ModuleId::default();
|
||||
let tokens = crate::parsing::token::lex(test_program, module_id).unwrap();
|
||||
let Program { non_code_meta, .. } = function_body.parse(tokens.as_slice()).unwrap().inner;
|
||||
assert_eq!(
|
||||
vec![Node::new(
|
||||
NonCodeNode {
|
||||
value: NonCodeValue::BlockComment {
|
||||
value: "this is a comment".to_owned(),
|
||||
style: CommentStyle::Line
|
||||
},
|
||||
digest: None,
|
||||
},
|
||||
0,
|
||||
20,
|
||||
module_id,
|
||||
)],
|
||||
non_code_meta.start_nodes,
|
||||
);
|
||||
let Program {
|
||||
body, non_code_meta, ..
|
||||
} = function_body.parse(tokens.as_slice()).unwrap().inner;
|
||||
assert_eq!(body[0].get_comments(), vec!["// this is a comment".to_owned()],);
|
||||
|
||||
assert_eq!(
|
||||
Some(&vec![
|
||||
@ -3326,21 +3310,7 @@ mySk1 = startSketchOn(XY)
|
||||
non_code_meta.non_code_nodes.get(&0),
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
Some(&vec![Node::new(
|
||||
NonCodeNode {
|
||||
value: NonCodeValue::BlockComment {
|
||||
value: "this is also a comment".to_owned(),
|
||||
style: CommentStyle::Line
|
||||
},
|
||||
digest: None,
|
||||
},
|
||||
94,
|
||||
120,
|
||||
module_id,
|
||||
)]),
|
||||
non_code_meta.non_code_nodes.get(&1),
|
||||
);
|
||||
assert_eq!(body[2].get_comments(), vec!["// this is also a comment".to_owned()],);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
@ -14,7 +14,8 @@ expression: actual
|
||||
},
|
||||
"raw": "1",
|
||||
"start": 0,
|
||||
"end": 1
|
||||
"end": 1,
|
||||
"commentStart": 0
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -25,8 +26,10 @@ expression: actual
|
||||
},
|
||||
"raw": "2",
|
||||
"start": 4,
|
||||
"end": 5
|
||||
"end": 5,
|
||||
"commentStart": 4
|
||||
},
|
||||
"start": 0,
|
||||
"end": 5
|
||||
"end": 5,
|
||||
"commentStart": 0
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
@ -14,7 +14,8 @@ expression: actual
|
||||
},
|
||||
"raw": "1",
|
||||
"start": 0,
|
||||
"end": 1
|
||||
"end": 1,
|
||||
"commentStart": 0
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -25,8 +26,10 @@ expression: actual
|
||||
},
|
||||
"raw": "2",
|
||||
"start": 2,
|
||||
"end": 3
|
||||
"end": 3,
|
||||
"commentStart": 2
|
||||
},
|
||||
"start": 0,
|
||||
"end": 3
|
||||
"end": 3,
|
||||
"commentStart": 0
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
@ -14,7 +14,8 @@ expression: actual
|
||||
},
|
||||
"raw": "1",
|
||||
"start": 0,
|
||||
"end": 1
|
||||
"end": 1,
|
||||
"commentStart": 0
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -25,8 +26,10 @@ expression: actual
|
||||
},
|
||||
"raw": "2",
|
||||
"start": 3,
|
||||
"end": 4
|
||||
"end": 4,
|
||||
"commentStart": 3
|
||||
},
|
||||
"start": 0,
|
||||
"end": 4
|
||||
"end": 4,
|
||||
"commentStart": 0
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
@ -14,7 +14,8 @@ expression: actual
|
||||
},
|
||||
"raw": "1",
|
||||
"start": 0,
|
||||
"end": 1
|
||||
"end": 1,
|
||||
"commentStart": 0
|
||||
},
|
||||
"right": {
|
||||
"type": "BinaryExpression",
|
||||
@ -29,7 +30,8 @@ expression: actual
|
||||
},
|
||||
"raw": "2",
|
||||
"start": 4,
|
||||
"end": 5
|
||||
"end": 5,
|
||||
"commentStart": 4
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -40,11 +42,14 @@ expression: actual
|
||||
},
|
||||
"raw": "3",
|
||||
"start": 8,
|
||||
"end": 9
|
||||
"end": 9,
|
||||
"commentStart": 8
|
||||
},
|
||||
"start": 4,
|
||||
"end": 9
|
||||
"end": 9,
|
||||
"commentStart": 4
|
||||
},
|
||||
"start": 0,
|
||||
"end": 9
|
||||
"end": 9,
|
||||
"commentStart": 0
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
@ -14,7 +14,8 @@ expression: actual
|
||||
},
|
||||
"raw": "1",
|
||||
"start": 0,
|
||||
"end": 1
|
||||
"end": 1,
|
||||
"commentStart": 0
|
||||
},
|
||||
"right": {
|
||||
"type": "BinaryExpression",
|
||||
@ -29,7 +30,8 @@ expression: actual
|
||||
},
|
||||
"raw": "2",
|
||||
"start": 6,
|
||||
"end": 7
|
||||
"end": 7,
|
||||
"commentStart": 6
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -40,11 +42,14 @@ expression: actual
|
||||
},
|
||||
"raw": "3",
|
||||
"start": 10,
|
||||
"end": 11
|
||||
"end": 11,
|
||||
"commentStart": 10
|
||||
},
|
||||
"start": 6,
|
||||
"end": 11
|
||||
"end": 11,
|
||||
"commentStart": 6
|
||||
},
|
||||
"start": 0,
|
||||
"end": 11
|
||||
"end": 11,
|
||||
"commentStart": 0
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
@ -18,7 +18,8 @@ expression: actual
|
||||
},
|
||||
"raw": "1",
|
||||
"start": 0,
|
||||
"end": 1
|
||||
"end": 1,
|
||||
"commentStart": 0
|
||||
},
|
||||
"right": {
|
||||
"type": "BinaryExpression",
|
||||
@ -33,7 +34,8 @@ expression: actual
|
||||
},
|
||||
"raw": "2",
|
||||
"start": 6,
|
||||
"end": 7
|
||||
"end": 7,
|
||||
"commentStart": 6
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -44,13 +46,16 @@ expression: actual
|
||||
},
|
||||
"raw": "3",
|
||||
"start": 10,
|
||||
"end": 11
|
||||
"end": 11,
|
||||
"commentStart": 10
|
||||
},
|
||||
"start": 6,
|
||||
"end": 11
|
||||
"end": 11,
|
||||
"commentStart": 6
|
||||
},
|
||||
"start": 0,
|
||||
"end": 11
|
||||
"end": 11,
|
||||
"commentStart": 0
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -61,8 +66,10 @@ expression: actual
|
||||
},
|
||||
"raw": "4",
|
||||
"start": 16,
|
||||
"end": 17
|
||||
"end": 17,
|
||||
"commentStart": 16
|
||||
},
|
||||
"start": 0,
|
||||
"end": 17
|
||||
"end": 17,
|
||||
"commentStart": 0
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
@ -14,7 +14,8 @@ expression: actual
|
||||
},
|
||||
"raw": "1",
|
||||
"start": 0,
|
||||
"end": 1
|
||||
"end": 1,
|
||||
"commentStart": 0
|
||||
},
|
||||
"right": {
|
||||
"type": "BinaryExpression",
|
||||
@ -33,7 +34,8 @@ expression: actual
|
||||
},
|
||||
"raw": "2",
|
||||
"start": 6,
|
||||
"end": 7
|
||||
"end": 7,
|
||||
"commentStart": 6
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -44,10 +46,12 @@ expression: actual
|
||||
},
|
||||
"raw": "3",
|
||||
"start": 10,
|
||||
"end": 11
|
||||
"end": 11,
|
||||
"commentStart": 10
|
||||
},
|
||||
"start": 6,
|
||||
"end": 11
|
||||
"end": 11,
|
||||
"commentStart": 6
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -58,11 +62,14 @@ expression: actual
|
||||
},
|
||||
"raw": "4",
|
||||
"start": 16,
|
||||
"end": 17
|
||||
"end": 17,
|
||||
"commentStart": 16
|
||||
},
|
||||
"start": 6,
|
||||
"end": 17
|
||||
"end": 17,
|
||||
"commentStart": 6
|
||||
},
|
||||
"start": 0,
|
||||
"end": 17
|
||||
"end": 17,
|
||||
"commentStart": 0
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
@ -14,7 +14,8 @@ expression: actual
|
||||
},
|
||||
"raw": "1",
|
||||
"start": 0,
|
||||
"end": 1
|
||||
"end": 1,
|
||||
"commentStart": 0
|
||||
},
|
||||
"right": {
|
||||
"type": "BinaryExpression",
|
||||
@ -37,7 +38,8 @@ expression: actual
|
||||
},
|
||||
"raw": "2",
|
||||
"start": 7,
|
||||
"end": 8
|
||||
"end": 8,
|
||||
"commentStart": 7
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -48,10 +50,12 @@ expression: actual
|
||||
},
|
||||
"raw": "3",
|
||||
"start": 11,
|
||||
"end": 12
|
||||
"end": 12,
|
||||
"commentStart": 11
|
||||
},
|
||||
"start": 7,
|
||||
"end": 12
|
||||
"end": 12,
|
||||
"commentStart": 7
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -62,10 +66,12 @@ expression: actual
|
||||
},
|
||||
"raw": "4",
|
||||
"start": 17,
|
||||
"end": 18
|
||||
"end": 18,
|
||||
"commentStart": 17
|
||||
},
|
||||
"start": 7,
|
||||
"end": 18
|
||||
"end": 18,
|
||||
"commentStart": 7
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -76,11 +82,14 @@ expression: actual
|
||||
},
|
||||
"raw": "5",
|
||||
"start": 21,
|
||||
"end": 22
|
||||
"end": 22,
|
||||
"commentStart": 21
|
||||
},
|
||||
"start": 7,
|
||||
"end": 22
|
||||
"end": 22,
|
||||
"commentStart": 7
|
||||
},
|
||||
"start": 0,
|
||||
"end": 22
|
||||
"end": 22,
|
||||
"commentStart": 0
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
@ -14,7 +14,8 @@ expression: actual
|
||||
},
|
||||
"raw": "1",
|
||||
"start": 0,
|
||||
"end": 1
|
||||
"end": 1,
|
||||
"commentStart": 0
|
||||
},
|
||||
"right": {
|
||||
"type": "BinaryExpression",
|
||||
@ -29,7 +30,8 @@ expression: actual
|
||||
},
|
||||
"raw": "2",
|
||||
"start": 8,
|
||||
"end": 9
|
||||
"end": 9,
|
||||
"commentStart": 8
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -40,11 +42,14 @@ expression: actual
|
||||
},
|
||||
"raw": "3",
|
||||
"start": 12,
|
||||
"end": 13
|
||||
"end": 13,
|
||||
"commentStart": 12
|
||||
},
|
||||
"start": 8,
|
||||
"end": 13
|
||||
"end": 13,
|
||||
"commentStart": 8
|
||||
},
|
||||
"start": 0,
|
||||
"end": 13
|
||||
"end": 13,
|
||||
"commentStart": 0
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
@ -22,27 +22,32 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"name": "distance",
|
||||
"start": 0,
|
||||
"end": 8
|
||||
"end": 8,
|
||||
"commentStart": 0
|
||||
},
|
||||
"right": {
|
||||
"type": "Identifier",
|
||||
"type": "Identifier",
|
||||
"name": "p",
|
||||
"start": 11,
|
||||
"end": 12
|
||||
"end": 12,
|
||||
"commentStart": 11
|
||||
},
|
||||
"start": 0,
|
||||
"end": 12
|
||||
"end": 12,
|
||||
"commentStart": 0
|
||||
},
|
||||
"right": {
|
||||
"type": "Identifier",
|
||||
"type": "Identifier",
|
||||
"name": "FOS",
|
||||
"start": 15,
|
||||
"end": 18
|
||||
"end": 18,
|
||||
"commentStart": 15
|
||||
},
|
||||
"start": 0,
|
||||
"end": 18
|
||||
"end": 18,
|
||||
"commentStart": 0
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -53,10 +58,12 @@ expression: actual
|
||||
},
|
||||
"raw": "6",
|
||||
"start": 21,
|
||||
"end": 22
|
||||
"end": 22,
|
||||
"commentStart": 21
|
||||
},
|
||||
"start": 0,
|
||||
"end": 22
|
||||
"end": 22,
|
||||
"commentStart": 0
|
||||
},
|
||||
"right": {
|
||||
"type": "BinaryExpression",
|
||||
@ -67,18 +74,22 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"name": "sigmaAllow",
|
||||
"start": 26,
|
||||
"end": 36
|
||||
"end": 36,
|
||||
"commentStart": 26
|
||||
},
|
||||
"right": {
|
||||
"type": "Identifier",
|
||||
"type": "Identifier",
|
||||
"name": "width",
|
||||
"start": 39,
|
||||
"end": 44
|
||||
"end": 44,
|
||||
"commentStart": 39
|
||||
},
|
||||
"start": 26,
|
||||
"end": 44
|
||||
"end": 44,
|
||||
"commentStart": 26
|
||||
},
|
||||
"start": 0,
|
||||
"end": 44
|
||||
"end": 44,
|
||||
"commentStart": 0
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
@ -14,7 +14,8 @@ expression: actual
|
||||
},
|
||||
"raw": "2",
|
||||
"start": 0,
|
||||
"end": 1
|
||||
"end": 1,
|
||||
"commentStart": 0
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -25,8 +26,10 @@ expression: actual
|
||||
},
|
||||
"raw": "3",
|
||||
"start": 7,
|
||||
"end": 8
|
||||
"end": 8,
|
||||
"commentStart": 7
|
||||
},
|
||||
"start": 0,
|
||||
"end": 8
|
||||
"end": 8,
|
||||
"commentStart": 0
|
||||
}
|
||||
|
@ -5,9 +5,12 @@ expression: actual
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 170,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 9,
|
||||
"name": "boxSketch",
|
||||
"start": 0,
|
||||
@ -18,6 +21,7 @@ expression: actual
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 26,
|
||||
"end": 28,
|
||||
"name": "XY",
|
||||
"start": 26,
|
||||
@ -26,11 +30,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 12,
|
||||
"end": 25,
|
||||
"name": "startSketchOn",
|
||||
"start": 12,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 12,
|
||||
"end": 29,
|
||||
"start": 12,
|
||||
"type": "CallExpression",
|
||||
@ -39,8 +45,10 @@ expression: actual
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 52,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 53,
|
||||
"end": 54,
|
||||
"raw": "0",
|
||||
"start": 53,
|
||||
@ -52,6 +60,7 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 56,
|
||||
"end": 57,
|
||||
"raw": "0",
|
||||
"start": 56,
|
||||
@ -69,6 +78,7 @@ expression: actual
|
||||
"type": "ArrayExpression"
|
||||
},
|
||||
{
|
||||
"commentStart": 60,
|
||||
"end": 61,
|
||||
"start": 60,
|
||||
"type": "PipeSubstitution",
|
||||
@ -76,11 +86,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 37,
|
||||
"end": 51,
|
||||
"name": "startProfileAt",
|
||||
"start": 37,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 37,
|
||||
"end": 62,
|
||||
"start": 37,
|
||||
"type": "CallExpression",
|
||||
@ -89,8 +101,10 @@ expression: actual
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 75,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 76,
|
||||
"end": 77,
|
||||
"raw": "0",
|
||||
"start": 76,
|
||||
@ -102,6 +116,7 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 79,
|
||||
"end": 81,
|
||||
"raw": "10",
|
||||
"start": 79,
|
||||
@ -119,6 +134,7 @@ expression: actual
|
||||
"type": "ArrayExpression"
|
||||
},
|
||||
{
|
||||
"commentStart": 84,
|
||||
"end": 85,
|
||||
"start": 84,
|
||||
"type": "PipeSubstitution",
|
||||
@ -126,11 +142,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 70,
|
||||
"end": 74,
|
||||
"name": "line",
|
||||
"start": 70,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 70,
|
||||
"end": 86,
|
||||
"start": 70,
|
||||
"type": "CallExpression",
|
||||
@ -139,9 +157,11 @@ expression: actual
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 108,
|
||||
"elements": [
|
||||
{
|
||||
"argument": {
|
||||
"commentStart": 110,
|
||||
"end": 111,
|
||||
"raw": "5",
|
||||
"start": 110,
|
||||
@ -152,6 +172,7 @@ expression: actual
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
"commentStart": 109,
|
||||
"end": 111,
|
||||
"operator": "-",
|
||||
"start": 109,
|
||||
@ -159,6 +180,7 @@ expression: actual
|
||||
"type": "UnaryExpression"
|
||||
},
|
||||
{
|
||||
"commentStart": 113,
|
||||
"end": 114,
|
||||
"raw": "5",
|
||||
"start": 113,
|
||||
@ -176,6 +198,7 @@ expression: actual
|
||||
"type": "ArrayExpression"
|
||||
},
|
||||
{
|
||||
"commentStart": 117,
|
||||
"end": 118,
|
||||
"start": 117,
|
||||
"type": "PipeSubstitution",
|
||||
@ -183,11 +206,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 94,
|
||||
"end": 107,
|
||||
"name": "tangentialArc",
|
||||
"start": 94,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 94,
|
||||
"end": 119,
|
||||
"start": 94,
|
||||
"type": "CallExpression",
|
||||
@ -196,8 +221,10 @@ expression: actual
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 132,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 133,
|
||||
"end": 134,
|
||||
"raw": "5",
|
||||
"start": 133,
|
||||
@ -210,6 +237,7 @@ expression: actual
|
||||
},
|
||||
{
|
||||
"argument": {
|
||||
"commentStart": 137,
|
||||
"end": 139,
|
||||
"raw": "15",
|
||||
"start": 137,
|
||||
@ -220,6 +248,7 @@ expression: actual
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
"commentStart": 136,
|
||||
"end": 139,
|
||||
"operator": "-",
|
||||
"start": 136,
|
||||
@ -233,6 +262,7 @@ expression: actual
|
||||
"type": "ArrayExpression"
|
||||
},
|
||||
{
|
||||
"commentStart": 142,
|
||||
"end": 143,
|
||||
"start": 142,
|
||||
"type": "PipeSubstitution",
|
||||
@ -240,11 +270,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 127,
|
||||
"end": 131,
|
||||
"name": "line",
|
||||
"start": 127,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 127,
|
||||
"end": 144,
|
||||
"start": 127,
|
||||
"type": "CallExpression",
|
||||
@ -255,12 +287,14 @@ expression: actual
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 160,
|
||||
"end": 166,
|
||||
"name": "length",
|
||||
"start": 160,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 167,
|
||||
"end": 169,
|
||||
"raw": "10",
|
||||
"start": 167,
|
||||
@ -274,11 +308,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 152,
|
||||
"end": 159,
|
||||
"name": "extrude",
|
||||
"start": 152,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 152,
|
||||
"end": 170,
|
||||
"start": 152,
|
||||
"type": "CallExpressionKw",
|
||||
@ -286,6 +322,7 @@ expression: actual
|
||||
"unlabeled": null
|
||||
}
|
||||
],
|
||||
"commentStart": 12,
|
||||
"end": 170,
|
||||
"start": 12,
|
||||
"type": "PipeExpression",
|
||||
@ -301,6 +338,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 171,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,13 +1,16 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 11,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 2,
|
||||
"name": "sg",
|
||||
"start": 0,
|
||||
@ -15,12 +18,14 @@ expression: actual
|
||||
},
|
||||
"init": {
|
||||
"argument": {
|
||||
"commentStart": 6,
|
||||
"end": 11,
|
||||
"name": "scale",
|
||||
"start": 6,
|
||||
"type": "Identifier",
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 5,
|
||||
"end": 11,
|
||||
"operator": "-",
|
||||
"start": 5,
|
||||
@ -37,6 +42,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 11,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -5,20 +5,24 @@ expression: actual
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"end": 27,
|
||||
"expression": {
|
||||
"arguments": [
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 5,
|
||||
"end": 16,
|
||||
"name": "endAbsolute",
|
||||
"start": 5,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 19,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 20,
|
||||
"end": 21,
|
||||
"raw": "0",
|
||||
"start": 20,
|
||||
@ -31,6 +35,7 @@ expression: actual
|
||||
},
|
||||
{
|
||||
"argument": {
|
||||
"commentStart": 24,
|
||||
"end": 25,
|
||||
"raw": "1",
|
||||
"start": 24,
|
||||
@ -41,6 +46,7 @@ expression: actual
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
"commentStart": 23,
|
||||
"end": 25,
|
||||
"operator": "-",
|
||||
"start": 23,
|
||||
@ -56,11 +62,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 0,
|
||||
"end": 4,
|
||||
"name": "line",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 0,
|
||||
"end": 27,
|
||||
"start": 0,
|
||||
"type": "CallExpressionKw",
|
||||
@ -72,6 +80,7 @@ expression: actual
|
||||
"type": "ExpressionStatement"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 27,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,21 +1,26 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 17,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 7,
|
||||
"name": "myArray",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 10,
|
||||
"end": 17,
|
||||
"endElement": {
|
||||
"commentStart": 14,
|
||||
"end": 16,
|
||||
"raw": "10",
|
||||
"start": 14,
|
||||
@ -29,6 +34,7 @@ expression: actual
|
||||
"endInclusive": true,
|
||||
"start": 10,
|
||||
"startElement": {
|
||||
"commentStart": 11,
|
||||
"end": 12,
|
||||
"raw": "0",
|
||||
"start": 11,
|
||||
@ -52,6 +58,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 17,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,13 +1,16 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 5,
|
||||
"declaration": {
|
||||
"commentStart": 8,
|
||||
"end": 57,
|
||||
"id": {
|
||||
"commentStart": 8,
|
||||
"end": 24,
|
||||
"name": "firstPrimeNumber",
|
||||
"start": 8,
|
||||
@ -18,6 +21,7 @@ expression: actual
|
||||
"body": [
|
||||
{
|
||||
"argument": {
|
||||
"commentStart": 50,
|
||||
"end": 51,
|
||||
"raw": "2",
|
||||
"start": 50,
|
||||
@ -28,15 +32,18 @@ expression: actual
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
"commentStart": 43,
|
||||
"end": 51,
|
||||
"start": 43,
|
||||
"type": "ReturnStatement",
|
||||
"type": "ReturnStatement"
|
||||
}
|
||||
],
|
||||
"commentStart": 33,
|
||||
"end": 57,
|
||||
"start": 33
|
||||
},
|
||||
"commentStart": 27,
|
||||
"end": 57,
|
||||
"params": [],
|
||||
"start": 27,
|
||||
@ -53,15 +60,18 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
},
|
||||
{
|
||||
"commentStart": 62,
|
||||
"end": 80,
|
||||
"expression": {
|
||||
"arguments": [],
|
||||
"callee": {
|
||||
"commentStart": 62,
|
||||
"end": 78,
|
||||
"name": "firstPrimeNumber",
|
||||
"start": 62,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 62,
|
||||
"end": 80,
|
||||
"start": 62,
|
||||
"type": "CallExpression",
|
||||
@ -72,6 +82,7 @@ expression: actual
|
||||
"type": "ExpressionStatement"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 80,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,13 +1,16 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 3,
|
||||
"end": 49,
|
||||
"id": {
|
||||
"commentStart": 3,
|
||||
"end": 8,
|
||||
"name": "thing",
|
||||
"start": 3,
|
||||
@ -18,6 +21,7 @@ expression: actual
|
||||
"body": [
|
||||
{
|
||||
"argument": {
|
||||
"commentStart": 39,
|
||||
"end": 43,
|
||||
"raw": "true",
|
||||
"start": 39,
|
||||
@ -25,20 +29,24 @@ expression: actual
|
||||
"type": "Literal",
|
||||
"value": true
|
||||
},
|
||||
"commentStart": 32,
|
||||
"end": 43,
|
||||
"start": 32,
|
||||
"type": "ReturnStatement",
|
||||
"type": "ReturnStatement"
|
||||
}
|
||||
],
|
||||
"commentStart": 22,
|
||||
"end": 49,
|
||||
"start": 22
|
||||
},
|
||||
"commentStart": 11,
|
||||
"end": 49,
|
||||
"params": [
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": {
|
||||
"commentStart": 12,
|
||||
"end": 17,
|
||||
"name": "param",
|
||||
"start": 12,
|
||||
@ -60,10 +68,12 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
},
|
||||
{
|
||||
"commentStart": 54,
|
||||
"end": 66,
|
||||
"expression": {
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 60,
|
||||
"end": 65,
|
||||
"raw": "false",
|
||||
"start": 60,
|
||||
@ -73,11 +83,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 54,
|
||||
"end": 59,
|
||||
"name": "thing",
|
||||
"start": 54,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 54,
|
||||
"end": 66,
|
||||
"start": 54,
|
||||
"type": "CallExpression",
|
||||
@ -88,6 +100,7 @@ expression: actual
|
||||
"type": "ExpressionStatement"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 66,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -5,9 +5,12 @@ expression: actual
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 230,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 8,
|
||||
"name": "mySketch",
|
||||
"start": 0,
|
||||
@ -18,6 +21,7 @@ expression: actual
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 25,
|
||||
"end": 27,
|
||||
"name": "XY",
|
||||
"start": 25,
|
||||
@ -26,11 +30,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 11,
|
||||
"end": 24,
|
||||
"name": "startSketchOn",
|
||||
"start": 11,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 11,
|
||||
"end": 28,
|
||||
"start": 11,
|
||||
"type": "CallExpression",
|
||||
@ -39,8 +45,10 @@ expression: actual
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 55,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 56,
|
||||
"end": 57,
|
||||
"raw": "0",
|
||||
"start": 56,
|
||||
@ -52,6 +60,7 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 58,
|
||||
"end": 59,
|
||||
"raw": "0",
|
||||
"start": 58,
|
||||
@ -69,6 +78,7 @@ expression: actual
|
||||
"type": "ArrayExpression"
|
||||
},
|
||||
{
|
||||
"commentStart": 62,
|
||||
"end": 63,
|
||||
"start": 62,
|
||||
"type": "PipeSubstitution",
|
||||
@ -76,11 +86,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 40,
|
||||
"end": 54,
|
||||
"name": "startProfileAt",
|
||||
"start": 40,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 40,
|
||||
"end": 64,
|
||||
"start": 40,
|
||||
"type": "CallExpression",
|
||||
@ -91,14 +103,17 @@ expression: actual
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 81,
|
||||
"end": 92,
|
||||
"name": "endAbsolute",
|
||||
"start": 81,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 95,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 96,
|
||||
"end": 97,
|
||||
"raw": "0",
|
||||
"start": 96,
|
||||
@ -110,6 +125,7 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 99,
|
||||
"end": 100,
|
||||
"raw": "1",
|
||||
"start": 99,
|
||||
@ -130,12 +146,14 @@ expression: actual
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 103,
|
||||
"end": 106,
|
||||
"name": "tag",
|
||||
"start": 103,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 109,
|
||||
"end": 116,
|
||||
"start": 109,
|
||||
"type": "TagDeclarator",
|
||||
@ -145,11 +163,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 76,
|
||||
"end": 80,
|
||||
"name": "line",
|
||||
"start": 76,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 76,
|
||||
"end": 117,
|
||||
"start": 76,
|
||||
"type": "CallExpressionKw",
|
||||
@ -161,14 +181,17 @@ expression: actual
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 134,
|
||||
"end": 145,
|
||||
"name": "endAbsolute",
|
||||
"start": 134,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 148,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 149,
|
||||
"end": 150,
|
||||
"raw": "1",
|
||||
"start": 149,
|
||||
@ -180,6 +203,7 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 152,
|
||||
"end": 153,
|
||||
"raw": "1",
|
||||
"start": 152,
|
||||
@ -199,11 +223,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 129,
|
||||
"end": 133,
|
||||
"name": "line",
|
||||
"start": 129,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 129,
|
||||
"end": 155,
|
||||
"start": 129,
|
||||
"type": "CallExpressionKw",
|
||||
@ -215,14 +241,17 @@ expression: actual
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 172,
|
||||
"end": 183,
|
||||
"name": "endAbsolute",
|
||||
"start": 172,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 186,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 187,
|
||||
"end": 188,
|
||||
"raw": "1",
|
||||
"start": 187,
|
||||
@ -234,6 +263,7 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 190,
|
||||
"end": 191,
|
||||
"raw": "0",
|
||||
"start": 190,
|
||||
@ -254,12 +284,14 @@ expression: actual
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 194,
|
||||
"end": 197,
|
||||
"name": "tag",
|
||||
"start": 194,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 200,
|
||||
"end": 210,
|
||||
"start": 200,
|
||||
"type": "TagDeclarator",
|
||||
@ -269,11 +301,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 167,
|
||||
"end": 171,
|
||||
"name": "line",
|
||||
"start": 167,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 167,
|
||||
"end": 211,
|
||||
"start": 167,
|
||||
"type": "CallExpressionKw",
|
||||
@ -283,17 +317,20 @@ expression: actual
|
||||
{
|
||||
"arguments": [],
|
||||
"callee": {
|
||||
"commentStart": 223,
|
||||
"end": 228,
|
||||
"name": "close",
|
||||
"start": 223,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 223,
|
||||
"end": 230,
|
||||
"start": 223,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
}
|
||||
],
|
||||
"commentStart": 11,
|
||||
"end": 230,
|
||||
"start": 11,
|
||||
"type": "PipeExpression",
|
||||
@ -309,6 +346,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 230,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -5,9 +5,12 @@ expression: actual
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 97,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 8,
|
||||
"name": "mySketch",
|
||||
"start": 0,
|
||||
@ -18,6 +21,7 @@ expression: actual
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 25,
|
||||
"end": 27,
|
||||
"name": "XY",
|
||||
"start": 25,
|
||||
@ -26,11 +30,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 11,
|
||||
"end": 24,
|
||||
"name": "startSketchOn",
|
||||
"start": 11,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 11,
|
||||
"end": 28,
|
||||
"start": 11,
|
||||
"type": "CallExpression",
|
||||
@ -39,8 +45,10 @@ expression: actual
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 47,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 48,
|
||||
"end": 49,
|
||||
"raw": "0",
|
||||
"start": 48,
|
||||
@ -52,6 +60,7 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 50,
|
||||
"end": 51,
|
||||
"raw": "0",
|
||||
"start": 50,
|
||||
@ -69,6 +78,7 @@ expression: actual
|
||||
"type": "ArrayExpression"
|
||||
},
|
||||
{
|
||||
"commentStart": 54,
|
||||
"end": 55,
|
||||
"start": 54,
|
||||
"type": "PipeSubstitution",
|
||||
@ -76,11 +86,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 32,
|
||||
"end": 46,
|
||||
"name": "startProfileAt",
|
||||
"start": 32,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 32,
|
||||
"end": 56,
|
||||
"start": 32,
|
||||
"type": "CallExpression",
|
||||
@ -91,14 +103,17 @@ expression: actual
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 65,
|
||||
"end": 76,
|
||||
"name": "endAbsolute",
|
||||
"start": 65,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 79,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 80,
|
||||
"end": 81,
|
||||
"raw": "1",
|
||||
"start": 80,
|
||||
@ -110,6 +125,7 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 83,
|
||||
"end": 84,
|
||||
"raw": "1",
|
||||
"start": 83,
|
||||
@ -129,11 +145,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 60,
|
||||
"end": 64,
|
||||
"name": "line",
|
||||
"start": 60,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 60,
|
||||
"end": 86,
|
||||
"start": 60,
|
||||
"type": "CallExpressionKw",
|
||||
@ -143,17 +161,20 @@ expression: actual
|
||||
{
|
||||
"arguments": [],
|
||||
"callee": {
|
||||
"commentStart": 90,
|
||||
"end": 95,
|
||||
"name": "close",
|
||||
"start": 90,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 90,
|
||||
"end": 97,
|
||||
"start": 90,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
}
|
||||
],
|
||||
"commentStart": 11,
|
||||
"end": 97,
|
||||
"start": 11,
|
||||
"type": "PipeExpression",
|
||||
@ -169,6 +190,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 97,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -5,9 +5,12 @@ expression: actual
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 49,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 5,
|
||||
"name": "myBox",
|
||||
"start": 0,
|
||||
@ -18,6 +21,7 @@ expression: actual
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 22,
|
||||
"end": 24,
|
||||
"name": "XY",
|
||||
"start": 22,
|
||||
@ -26,11 +30,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 8,
|
||||
"end": 21,
|
||||
"name": "startSketchOn",
|
||||
"start": 8,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 8,
|
||||
"end": 25,
|
||||
"start": 8,
|
||||
"type": "CallExpression",
|
||||
@ -39,6 +45,7 @@ expression: actual
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 44,
|
||||
"end": 45,
|
||||
"name": "p",
|
||||
"start": 44,
|
||||
@ -46,6 +53,7 @@ expression: actual
|
||||
"type": "Identifier"
|
||||
},
|
||||
{
|
||||
"commentStart": 47,
|
||||
"end": 48,
|
||||
"start": 47,
|
||||
"type": "PipeSubstitution",
|
||||
@ -53,17 +61,20 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 29,
|
||||
"end": 43,
|
||||
"name": "startProfileAt",
|
||||
"start": 29,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 29,
|
||||
"end": 49,
|
||||
"start": 29,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
}
|
||||
],
|
||||
"commentStart": 8,
|
||||
"end": 49,
|
||||
"start": 8,
|
||||
"type": "PipeExpression",
|
||||
@ -79,6 +90,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 49,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,13 +1,16 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 23,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 5,
|
||||
"name": "myBox",
|
||||
"start": 0,
|
||||
@ -18,6 +21,7 @@ expression: actual
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 10,
|
||||
"end": 11,
|
||||
"raw": "1",
|
||||
"start": 10,
|
||||
@ -30,11 +34,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 8,
|
||||
"end": 9,
|
||||
"name": "f",
|
||||
"start": 8,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 8,
|
||||
"end": 12,
|
||||
"start": 8,
|
||||
"type": "CallExpression",
|
||||
@ -43,6 +49,7 @@ expression: actual
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 18,
|
||||
"end": 19,
|
||||
"raw": "2",
|
||||
"start": 18,
|
||||
@ -54,6 +61,7 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 21,
|
||||
"end": 22,
|
||||
"start": 21,
|
||||
"type": "PipeSubstitution",
|
||||
@ -61,17 +69,20 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 16,
|
||||
"end": 17,
|
||||
"name": "g",
|
||||
"start": 16,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 16,
|
||||
"end": 23,
|
||||
"start": 16,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
}
|
||||
],
|
||||
"commentStart": 8,
|
||||
"end": 23,
|
||||
"start": 8,
|
||||
"type": "PipeExpression",
|
||||
@ -87,6 +98,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 23,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -5,9 +5,12 @@ expression: actual
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 71,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 5,
|
||||
"name": "myBox",
|
||||
"start": 0,
|
||||
@ -18,6 +21,7 @@ expression: actual
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 22,
|
||||
"end": 24,
|
||||
"name": "XY",
|
||||
"start": 22,
|
||||
@ -26,11 +30,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 8,
|
||||
"end": 21,
|
||||
"name": "startSketchOn",
|
||||
"start": 8,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 8,
|
||||
"end": 25,
|
||||
"start": 8,
|
||||
"type": "CallExpression",
|
||||
@ -39,6 +45,7 @@ expression: actual
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 44,
|
||||
"end": 45,
|
||||
"name": "p",
|
||||
"start": 44,
|
||||
@ -46,6 +53,7 @@ expression: actual
|
||||
"type": "Identifier"
|
||||
},
|
||||
{
|
||||
"commentStart": 47,
|
||||
"end": 48,
|
||||
"start": 47,
|
||||
"type": "PipeSubstitution",
|
||||
@ -53,11 +61,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 29,
|
||||
"end": 43,
|
||||
"name": "startProfileAt",
|
||||
"start": 29,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 29,
|
||||
"end": 49,
|
||||
"start": 29,
|
||||
"type": "CallExpression",
|
||||
@ -68,14 +78,17 @@ expression: actual
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 58,
|
||||
"end": 61,
|
||||
"name": "end",
|
||||
"start": 58,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 64,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 65,
|
||||
"end": 66,
|
||||
"raw": "0",
|
||||
"start": 65,
|
||||
@ -87,6 +100,7 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 68,
|
||||
"end": 69,
|
||||
"name": "l",
|
||||
"start": 68,
|
||||
@ -102,11 +116,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 53,
|
||||
"end": 57,
|
||||
"name": "line",
|
||||
"start": 53,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 53,
|
||||
"end": 71,
|
||||
"start": 53,
|
||||
"type": "CallExpressionKw",
|
||||
@ -114,6 +130,7 @@ expression: actual
|
||||
"unlabeled": null
|
||||
}
|
||||
],
|
||||
"commentStart": 8,
|
||||
"end": 71,
|
||||
"start": 8,
|
||||
"type": "PipeExpression",
|
||||
@ -129,6 +146,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 71,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -5,20 +5,24 @@ expression: actual
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"end": 26,
|
||||
"expression": {
|
||||
"arguments": [
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 5,
|
||||
"end": 16,
|
||||
"name": "endAbsolute",
|
||||
"start": 5,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 19,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 20,
|
||||
"end": 21,
|
||||
"raw": "0",
|
||||
"start": 20,
|
||||
@ -30,6 +34,7 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 23,
|
||||
"end": 24,
|
||||
"raw": "1",
|
||||
"start": 23,
|
||||
@ -49,11 +54,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 0,
|
||||
"end": 4,
|
||||
"name": "line",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 0,
|
||||
"end": 26,
|
||||
"start": 0,
|
||||
"type": "CallExpressionKw",
|
||||
@ -65,6 +72,7 @@ expression: actual
|
||||
"type": "ExpressionStatement"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 26,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -5,9 +5,12 @@ expression: actual
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 56,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 8,
|
||||
"name": "mySketch",
|
||||
"start": 0,
|
||||
@ -18,6 +21,7 @@ expression: actual
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 25,
|
||||
"end": 27,
|
||||
"name": "XY",
|
||||
"start": 25,
|
||||
@ -26,11 +30,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 11,
|
||||
"end": 24,
|
||||
"name": "startSketchOn",
|
||||
"start": 11,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 11,
|
||||
"end": 28,
|
||||
"start": 11,
|
||||
"type": "CallExpression",
|
||||
@ -39,8 +45,10 @@ expression: actual
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 47,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 48,
|
||||
"end": 49,
|
||||
"raw": "0",
|
||||
"start": 48,
|
||||
@ -52,6 +60,7 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 50,
|
||||
"end": 51,
|
||||
"raw": "0",
|
||||
"start": 50,
|
||||
@ -69,6 +78,7 @@ expression: actual
|
||||
"type": "ArrayExpression"
|
||||
},
|
||||
{
|
||||
"commentStart": 54,
|
||||
"end": 55,
|
||||
"start": 54,
|
||||
"type": "PipeSubstitution",
|
||||
@ -76,17 +86,20 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 32,
|
||||
"end": 46,
|
||||
"name": "startProfileAt",
|
||||
"start": 32,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 32,
|
||||
"end": 56,
|
||||
"start": 32,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
}
|
||||
],
|
||||
"commentStart": 11,
|
||||
"end": 56,
|
||||
"start": 11,
|
||||
"type": "PipeExpression",
|
||||
@ -102,6 +115,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 56,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,14 +1,16 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"end": 28,
|
||||
"expression": {
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 4,
|
||||
"end": 5,
|
||||
"raw": "5",
|
||||
"start": 4,
|
||||
@ -20,6 +22,7 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 7,
|
||||
"end": 14,
|
||||
"raw": "\"hello\"",
|
||||
"start": 7,
|
||||
@ -28,6 +31,7 @@ expression: actual
|
||||
"value": "hello"
|
||||
},
|
||||
{
|
||||
"commentStart": 16,
|
||||
"end": 27,
|
||||
"name": "aIdentifier",
|
||||
"start": 16,
|
||||
@ -36,11 +40,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 0,
|
||||
"end": 3,
|
||||
"name": "log",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 0,
|
||||
"end": 28,
|
||||
"start": 0,
|
||||
"type": "CallExpression",
|
||||
@ -51,6 +57,7 @@ expression: actual
|
||||
"type": "ExpressionStatement"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 28,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,14 +1,17 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"end": 7,
|
||||
"expression": {
|
||||
"commentStart": 0,
|
||||
"end": 7,
|
||||
"left": {
|
||||
"commentStart": 0,
|
||||
"end": 1,
|
||||
"raw": "5",
|
||||
"start": 0,
|
||||
@ -21,6 +24,7 @@ expression: actual
|
||||
},
|
||||
"operator": "+",
|
||||
"right": {
|
||||
"commentStart": 4,
|
||||
"end": 7,
|
||||
"raw": "\"a\"",
|
||||
"start": 4,
|
||||
@ -37,6 +41,7 @@ expression: actual
|
||||
"type": "ExpressionStatement"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 7,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,16 +1,19 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"end": 15,
|
||||
"expression": {
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 5,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 6,
|
||||
"end": 7,
|
||||
"raw": "0",
|
||||
"start": 6,
|
||||
@ -22,6 +25,7 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 9,
|
||||
"end": 10,
|
||||
"name": "l",
|
||||
"start": 9,
|
||||
@ -35,6 +39,7 @@ expression: actual
|
||||
"type": "ArrayExpression"
|
||||
},
|
||||
{
|
||||
"commentStart": 13,
|
||||
"end": 14,
|
||||
"start": 13,
|
||||
"type": "PipeSubstitution",
|
||||
@ -42,11 +47,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 0,
|
||||
"end": 4,
|
||||
"name": "line",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 0,
|
||||
"end": 15,
|
||||
"start": 0,
|
||||
"type": "CallExpression",
|
||||
@ -57,6 +64,7 @@ expression: actual
|
||||
"type": "ExpressionStatement"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 15,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -5,9 +5,12 @@ expression: actual
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 6,
|
||||
"end": 106,
|
||||
"id": {
|
||||
"commentStart": 6,
|
||||
"end": 14,
|
||||
"name": "cylinder",
|
||||
"start": 6,
|
||||
@ -18,6 +21,7 @@ expression: actual
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 31,
|
||||
"end": 35,
|
||||
"raw": "'XY'",
|
||||
"start": 31,
|
||||
@ -27,11 +31,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 17,
|
||||
"end": 30,
|
||||
"name": "startSketchOn",
|
||||
"start": 17,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 17,
|
||||
"end": 36,
|
||||
"start": 17,
|
||||
"type": "CallExpression",
|
||||
@ -42,14 +48,17 @@ expression: actual
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 51,
|
||||
"end": 57,
|
||||
"name": "center",
|
||||
"start": 51,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 59,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 60,
|
||||
"end": 61,
|
||||
"raw": "0",
|
||||
"start": 60,
|
||||
@ -61,6 +70,7 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 63,
|
||||
"end": 64,
|
||||
"raw": "0",
|
||||
"start": 63,
|
||||
@ -81,12 +91,14 @@ expression: actual
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 67,
|
||||
"end": 73,
|
||||
"name": "radius",
|
||||
"start": 67,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 75,
|
||||
"end": 77,
|
||||
"raw": "22",
|
||||
"start": 75,
|
||||
@ -100,11 +112,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 44,
|
||||
"end": 50,
|
||||
"name": "circle",
|
||||
"start": 44,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 44,
|
||||
"end": 78,
|
||||
"start": 44,
|
||||
"type": "CallExpressionKw",
|
||||
@ -116,12 +130,14 @@ expression: actual
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 94,
|
||||
"end": 100,
|
||||
"name": "length",
|
||||
"start": 94,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 103,
|
||||
"end": 105,
|
||||
"raw": "14",
|
||||
"start": 103,
|
||||
@ -135,11 +151,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 86,
|
||||
"end": 93,
|
||||
"name": "extrude",
|
||||
"start": 86,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 86,
|
||||
"end": 106,
|
||||
"start": 86,
|
||||
"type": "CallExpressionKw",
|
||||
@ -147,6 +165,7 @@ expression: actual
|
||||
"unlabeled": null
|
||||
}
|
||||
],
|
||||
"commentStart": 17,
|
||||
"end": 106,
|
||||
"start": 17,
|
||||
"type": "PipeExpression",
|
||||
@ -162,6 +181,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 107,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,13 +1,16 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 3,
|
||||
"end": 49,
|
||||
"id": {
|
||||
"commentStart": 3,
|
||||
"end": 4,
|
||||
"name": "f",
|
||||
"start": 3,
|
||||
@ -20,6 +23,7 @@ expression: actual
|
||||
"argument": {
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 36,
|
||||
"end": 41,
|
||||
"name": "angle",
|
||||
"start": 36,
|
||||
@ -27,6 +31,7 @@ expression: actual
|
||||
"type": "Identifier"
|
||||
},
|
||||
{
|
||||
"commentStart": 43,
|
||||
"end": 46,
|
||||
"raw": "360",
|
||||
"start": 43,
|
||||
@ -39,30 +44,36 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 28,
|
||||
"end": 35,
|
||||
"name": "default",
|
||||
"start": 28,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 28,
|
||||
"end": 47,
|
||||
"start": 28,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
},
|
||||
"commentStart": 21,
|
||||
"end": 47,
|
||||
"start": 21,
|
||||
"type": "ReturnStatement",
|
||||
"type": "ReturnStatement"
|
||||
}
|
||||
],
|
||||
"commentStart": 19,
|
||||
"end": 49,
|
||||
"start": 19
|
||||
},
|
||||
"commentStart": 7,
|
||||
"end": 49,
|
||||
"params": [
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": {
|
||||
"commentStart": 8,
|
||||
"end": 13,
|
||||
"name": "angle",
|
||||
"start": 8,
|
||||
@ -89,6 +100,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 49,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,21 +1,26 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 4,
|
||||
"end": 91,
|
||||
"id": {
|
||||
"commentStart": 4,
|
||||
"end": 11,
|
||||
"name": "numbers",
|
||||
"start": 4,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 14,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 28,
|
||||
"end": 29,
|
||||
"raw": "1",
|
||||
"start": 28,
|
||||
@ -27,6 +32,7 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 79,
|
||||
"end": 80,
|
||||
"raw": "3",
|
||||
"start": 79,
|
||||
@ -43,6 +49,7 @@ expression: actual
|
||||
"nonCodeNodes": {
|
||||
"1": [
|
||||
{
|
||||
"commentStart": 43,
|
||||
"end": 48,
|
||||
"start": 43,
|
||||
"type": "NonCodeNode",
|
||||
@ -55,6 +62,7 @@ expression: actual
|
||||
],
|
||||
"2": [
|
||||
{
|
||||
"commentStart": 61,
|
||||
"end": 66,
|
||||
"start": 61,
|
||||
"type": "NonCodeNode",
|
||||
@ -82,6 +90,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 91,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,21 +1,26 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 4,
|
||||
"end": 91,
|
||||
"id": {
|
||||
"commentStart": 4,
|
||||
"end": 11,
|
||||
"name": "numbers",
|
||||
"start": 4,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 14,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 28,
|
||||
"end": 29,
|
||||
"raw": "1",
|
||||
"start": 28,
|
||||
@ -27,6 +32,7 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 43,
|
||||
"end": 44,
|
||||
"raw": "2",
|
||||
"start": 43,
|
||||
@ -43,6 +49,7 @@ expression: actual
|
||||
"nonCodeNodes": {
|
||||
"2": [
|
||||
{
|
||||
"commentStart": 58,
|
||||
"end": 63,
|
||||
"start": 58,
|
||||
"type": "NonCodeNode",
|
||||
@ -55,6 +62,7 @@ expression: actual
|
||||
],
|
||||
"3": [
|
||||
{
|
||||
"commentStart": 76,
|
||||
"end": 81,
|
||||
"start": 76,
|
||||
"type": "NonCodeNode",
|
||||
@ -82,6 +90,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 91,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,24 +1,29 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 4,
|
||||
"end": 80,
|
||||
"id": {
|
||||
"commentStart": 4,
|
||||
"end": 9,
|
||||
"name": "props",
|
||||
"start": 4,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 12,
|
||||
"end": 80,
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {
|
||||
"1": [
|
||||
{
|
||||
"commentStart": 44,
|
||||
"end": 52,
|
||||
"start": 44,
|
||||
"type": "NonCodeNode",
|
||||
@ -34,8 +39,10 @@ expression: actual
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"commentStart": 26,
|
||||
"end": 30,
|
||||
"key": {
|
||||
"commentStart": 26,
|
||||
"end": 27,
|
||||
"name": "a",
|
||||
"start": 26,
|
||||
@ -44,6 +51,7 @@ expression: actual
|
||||
"start": 26,
|
||||
"type": "ObjectProperty",
|
||||
"value": {
|
||||
"commentStart": 29,
|
||||
"end": 30,
|
||||
"raw": "1",
|
||||
"start": 29,
|
||||
@ -56,8 +64,10 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 65,
|
||||
"end": 69,
|
||||
"key": {
|
||||
"commentStart": 65,
|
||||
"end": 66,
|
||||
"name": "c",
|
||||
"start": 65,
|
||||
@ -66,6 +76,7 @@ expression: actual
|
||||
"start": 65,
|
||||
"type": "ObjectProperty",
|
||||
"value": {
|
||||
"commentStart": 68,
|
||||
"end": 69,
|
||||
"raw": "3",
|
||||
"start": 68,
|
||||
@ -92,6 +103,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 80,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,24 +1,29 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 4,
|
||||
"end": 79,
|
||||
"id": {
|
||||
"commentStart": 4,
|
||||
"end": 9,
|
||||
"name": "props",
|
||||
"start": 4,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 12,
|
||||
"end": 79,
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {
|
||||
"1": [
|
||||
{
|
||||
"commentStart": 44,
|
||||
"end": 52,
|
||||
"start": 44,
|
||||
"type": "NonCodeNode",
|
||||
@ -34,8 +39,10 @@ expression: actual
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"commentStart": 26,
|
||||
"end": 30,
|
||||
"key": {
|
||||
"commentStart": 26,
|
||||
"end": 27,
|
||||
"name": "a",
|
||||
"start": 26,
|
||||
@ -44,6 +51,7 @@ expression: actual
|
||||
"start": 26,
|
||||
"type": "ObjectProperty",
|
||||
"value": {
|
||||
"commentStart": 29,
|
||||
"end": 30,
|
||||
"raw": "1",
|
||||
"start": 29,
|
||||
@ -56,8 +64,10 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 65,
|
||||
"end": 69,
|
||||
"key": {
|
||||
"commentStart": 65,
|
||||
"end": 66,
|
||||
"name": "c",
|
||||
"start": 65,
|
||||
@ -66,6 +76,7 @@ expression: actual
|
||||
"start": 65,
|
||||
"type": "ObjectProperty",
|
||||
"value": {
|
||||
"commentStart": 68,
|
||||
"end": 69,
|
||||
"raw": "3",
|
||||
"start": 68,
|
||||
@ -92,6 +103,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 79,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,13 +1,16 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 30,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 5,
|
||||
"name": "myVar",
|
||||
"start": 0,
|
||||
@ -16,6 +19,7 @@ expression: actual
|
||||
"init": {
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 12,
|
||||
"end": 13,
|
||||
"raw": "5",
|
||||
"start": 12,
|
||||
@ -30,6 +34,7 @@ expression: actual
|
||||
"argument": {
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 24,
|
||||
"end": 25,
|
||||
"raw": "5",
|
||||
"start": 24,
|
||||
@ -41,6 +46,7 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 27,
|
||||
"end": 28,
|
||||
"raw": "4",
|
||||
"start": 27,
|
||||
@ -53,16 +59,19 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 17,
|
||||
"end": 23,
|
||||
"name": "legLen",
|
||||
"start": 17,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 17,
|
||||
"end": 29,
|
||||
"start": 17,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
},
|
||||
"commentStart": 16,
|
||||
"end": 29,
|
||||
"operator": "-",
|
||||
"start": 16,
|
||||
@ -71,11 +80,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 8,
|
||||
"end": 11,
|
||||
"name": "min",
|
||||
"start": 8,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 8,
|
||||
"end": 30,
|
||||
"start": 8,
|
||||
"type": "CallExpression",
|
||||
@ -91,6 +102,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 30,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,13 +1,16 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 1,
|
||||
"declaration": {
|
||||
"commentStart": 1,
|
||||
"end": 126,
|
||||
"id": {
|
||||
"commentStart": 1,
|
||||
"end": 10,
|
||||
"name": "sketch001",
|
||||
"start": 1,
|
||||
@ -18,6 +21,7 @@ expression: actual
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 27,
|
||||
"end": 31,
|
||||
"raw": "'XY'",
|
||||
"start": 27,
|
||||
@ -27,11 +31,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 13,
|
||||
"end": 26,
|
||||
"name": "startSketchOn",
|
||||
"start": 13,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 13,
|
||||
"end": 32,
|
||||
"start": 13,
|
||||
"type": "CallExpression",
|
||||
@ -40,6 +46,7 @@ expression: actual
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 124,
|
||||
"end": 125,
|
||||
"start": 124,
|
||||
"type": "PipeSubstitution",
|
||||
@ -47,22 +54,26 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 109,
|
||||
"end": 123,
|
||||
"name": "startProfileAt",
|
||||
"start": 109,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 109,
|
||||
"end": 126,
|
||||
"start": 109,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
}
|
||||
],
|
||||
"commentStart": 13,
|
||||
"end": 126,
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {
|
||||
"0": [
|
||||
{
|
||||
"commentStart": 35,
|
||||
"end": 46,
|
||||
"start": 35,
|
||||
"type": "NonCodeNode",
|
||||
@ -73,6 +84,7 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 49,
|
||||
"end": 68,
|
||||
"start": 49,
|
||||
"type": "NonCodeNode",
|
||||
@ -83,6 +95,7 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 71,
|
||||
"end": 92,
|
||||
"start": 71,
|
||||
"type": "NonCodeNode",
|
||||
@ -93,6 +106,7 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 95,
|
||||
"end": 103,
|
||||
"start": 95,
|
||||
"type": "NonCodeNode",
|
||||
@ -120,6 +134,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 127,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,23 +1,29 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 1,
|
||||
"declaration": {
|
||||
"commentStart": 1,
|
||||
"end": 25,
|
||||
"id": {
|
||||
"commentStart": 1,
|
||||
"end": 5,
|
||||
"name": "my14",
|
||||
"start": 1,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 8,
|
||||
"end": 25,
|
||||
"left": {
|
||||
"commentStart": 8,
|
||||
"end": 13,
|
||||
"left": {
|
||||
"commentStart": 8,
|
||||
"end": 9,
|
||||
"raw": "4",
|
||||
"start": 8,
|
||||
@ -30,6 +36,7 @@ expression: actual
|
||||
},
|
||||
"operator": "^",
|
||||
"right": {
|
||||
"commentStart": 12,
|
||||
"end": 13,
|
||||
"raw": "2",
|
||||
"start": 12,
|
||||
@ -46,10 +53,13 @@ expression: actual
|
||||
},
|
||||
"operator": "-",
|
||||
"right": {
|
||||
"commentStart": 16,
|
||||
"end": 25,
|
||||
"left": {
|
||||
"commentStart": 16,
|
||||
"end": 21,
|
||||
"left": {
|
||||
"commentStart": 16,
|
||||
"end": 17,
|
||||
"raw": "3",
|
||||
"start": 16,
|
||||
@ -62,6 +72,7 @@ expression: actual
|
||||
},
|
||||
"operator": "^",
|
||||
"right": {
|
||||
"commentStart": 20,
|
||||
"end": 21,
|
||||
"raw": "2",
|
||||
"start": 20,
|
||||
@ -78,6 +89,7 @@ expression: actual
|
||||
},
|
||||
"operator": "*",
|
||||
"right": {
|
||||
"commentStart": 24,
|
||||
"end": 25,
|
||||
"raw": "2",
|
||||
"start": 24,
|
||||
@ -106,6 +118,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 26,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,20 +1,25 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 68,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 1,
|
||||
"name": "x",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 4,
|
||||
"cond": {
|
||||
"commentStart": 7,
|
||||
"end": 11,
|
||||
"raw": "true",
|
||||
"start": 7,
|
||||
@ -28,8 +33,10 @@ expression: actual
|
||||
"final_else": {
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 57,
|
||||
"end": 58,
|
||||
"expression": {
|
||||
"commentStart": 57,
|
||||
"end": 58,
|
||||
"raw": "4",
|
||||
"start": 57,
|
||||
@ -45,6 +52,7 @@ expression: actual
|
||||
"type": "ExpressionStatement"
|
||||
}
|
||||
],
|
||||
"commentStart": 57,
|
||||
"end": 67,
|
||||
"start": 57
|
||||
},
|
||||
@ -52,8 +60,10 @@ expression: actual
|
||||
"then_val": {
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 26,
|
||||
"end": 27,
|
||||
"expression": {
|
||||
"commentStart": 26,
|
||||
"end": 27,
|
||||
"raw": "3",
|
||||
"start": 26,
|
||||
@ -69,6 +79,7 @@ expression: actual
|
||||
"type": "ExpressionStatement"
|
||||
}
|
||||
],
|
||||
"commentStart": 26,
|
||||
"end": 36,
|
||||
"start": 26
|
||||
},
|
||||
@ -85,6 +96,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 68,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,20 +1,25 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 115,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 1,
|
||||
"name": "x",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 4,
|
||||
"cond": {
|
||||
"commentStart": 7,
|
||||
"end": 11,
|
||||
"raw": "true",
|
||||
"start": 7,
|
||||
@ -25,9 +30,11 @@ expression: actual
|
||||
"digest": null,
|
||||
"else_ifs": [
|
||||
{
|
||||
"commentStart": 38,
|
||||
"cond": {
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 51,
|
||||
"end": 57,
|
||||
"name": "radius",
|
||||
"start": 51,
|
||||
@ -36,11 +43,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 46,
|
||||
"end": 50,
|
||||
"name": "func",
|
||||
"start": 46,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 46,
|
||||
"end": 58,
|
||||
"start": 46,
|
||||
"type": "CallExpression",
|
||||
@ -52,8 +61,10 @@ expression: actual
|
||||
"then_val": {
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 73,
|
||||
"end": 74,
|
||||
"expression": {
|
||||
"commentStart": 73,
|
||||
"end": 74,
|
||||
"raw": "4",
|
||||
"start": 73,
|
||||
@ -69,6 +80,7 @@ expression: actual
|
||||
"type": "ExpressionStatement"
|
||||
}
|
||||
],
|
||||
"commentStart": 59,
|
||||
"end": 83,
|
||||
"start": 59
|
||||
},
|
||||
@ -79,8 +91,10 @@ expression: actual
|
||||
"final_else": {
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 104,
|
||||
"end": 105,
|
||||
"expression": {
|
||||
"commentStart": 104,
|
||||
"end": 105,
|
||||
"raw": "5",
|
||||
"start": 104,
|
||||
@ -96,6 +110,7 @@ expression: actual
|
||||
"type": "ExpressionStatement"
|
||||
}
|
||||
],
|
||||
"commentStart": 104,
|
||||
"end": 114,
|
||||
"start": 104
|
||||
},
|
||||
@ -103,8 +118,10 @@ expression: actual
|
||||
"then_val": {
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 26,
|
||||
"end": 27,
|
||||
"expression": {
|
||||
"commentStart": 26,
|
||||
"end": 27,
|
||||
"raw": "3",
|
||||
"start": 26,
|
||||
@ -120,6 +137,7 @@ expression: actual
|
||||
"type": "ExpressionStatement"
|
||||
}
|
||||
],
|
||||
"commentStart": 26,
|
||||
"end": 36,
|
||||
"start": 26
|
||||
},
|
||||
@ -136,6 +154,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 115,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,21 +1,26 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 4,
|
||||
"end": 14,
|
||||
"id": {
|
||||
"commentStart": 4,
|
||||
"end": 5,
|
||||
"name": "x",
|
||||
"start": 4,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 8,
|
||||
"end": 14,
|
||||
"left": {
|
||||
"commentStart": 8,
|
||||
"end": 9,
|
||||
"raw": "3",
|
||||
"start": 8,
|
||||
@ -28,6 +33,7 @@ expression: actual
|
||||
},
|
||||
"operator": "==",
|
||||
"right": {
|
||||
"commentStart": 13,
|
||||
"end": 14,
|
||||
"raw": "3",
|
||||
"start": 13,
|
||||
@ -52,6 +58,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 14,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,21 +1,26 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 4,
|
||||
"end": 14,
|
||||
"id": {
|
||||
"commentStart": 4,
|
||||
"end": 5,
|
||||
"name": "x",
|
||||
"start": 4,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 8,
|
||||
"end": 14,
|
||||
"left": {
|
||||
"commentStart": 8,
|
||||
"end": 9,
|
||||
"raw": "3",
|
||||
"start": 8,
|
||||
@ -28,6 +33,7 @@ expression: actual
|
||||
},
|
||||
"operator": "!=",
|
||||
"right": {
|
||||
"commentStart": 13,
|
||||
"end": 14,
|
||||
"raw": "3",
|
||||
"start": 13,
|
||||
@ -52,6 +58,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 14,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,19 +1,23 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 5,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 1,
|
||||
"name": "x",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 4,
|
||||
"end": 5,
|
||||
"raw": "4",
|
||||
"start": 4,
|
||||
@ -34,6 +38,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 5,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,24 +1,30 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 36,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 3,
|
||||
"name": "obj",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 6,
|
||||
"end": 36,
|
||||
"properties": [
|
||||
{
|
||||
"commentStart": 7,
|
||||
"end": 24,
|
||||
"key": {
|
||||
"commentStart": 7,
|
||||
"end": 13,
|
||||
"name": "center",
|
||||
"start": 7,
|
||||
@ -27,8 +33,10 @@ expression: actual
|
||||
"start": 7,
|
||||
"type": "ObjectProperty",
|
||||
"value": {
|
||||
"commentStart": 16,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 17,
|
||||
"end": 19,
|
||||
"raw": "10",
|
||||
"start": 17,
|
||||
@ -40,6 +48,7 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 21,
|
||||
"end": 23,
|
||||
"raw": "10",
|
||||
"start": 21,
|
||||
@ -58,8 +67,10 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 26,
|
||||
"end": 35,
|
||||
"key": {
|
||||
"commentStart": 26,
|
||||
"end": 32,
|
||||
"name": "radius",
|
||||
"start": 26,
|
||||
@ -68,6 +79,7 @@ expression: actual
|
||||
"start": 26,
|
||||
"type": "ObjectProperty",
|
||||
"value": {
|
||||
"commentStart": 34,
|
||||
"end": 35,
|
||||
"raw": "5",
|
||||
"start": 34,
|
||||
@ -94,6 +106,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 36,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,19 +1,23 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 5,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 1,
|
||||
"name": "x",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 4,
|
||||
"end": 5,
|
||||
"raw": "3",
|
||||
"start": 4,
|
||||
@ -34,20 +38,26 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
},
|
||||
{
|
||||
"commentStart": 14,
|
||||
"declaration": {
|
||||
"commentStart": 14,
|
||||
"end": 30,
|
||||
"id": {
|
||||
"commentStart": 14,
|
||||
"end": 17,
|
||||
"name": "obj",
|
||||
"start": 14,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 20,
|
||||
"end": 30,
|
||||
"properties": [
|
||||
{
|
||||
"commentStart": 22,
|
||||
"end": 23,
|
||||
"key": {
|
||||
"commentStart": 22,
|
||||
"end": 23,
|
||||
"name": "x",
|
||||
"start": 22,
|
||||
@ -56,6 +66,7 @@ expression: actual
|
||||
"start": 22,
|
||||
"type": "ObjectProperty",
|
||||
"value": {
|
||||
"commentStart": 22,
|
||||
"end": 23,
|
||||
"name": "x",
|
||||
"start": 22,
|
||||
@ -64,8 +75,10 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 25,
|
||||
"end": 29,
|
||||
"key": {
|
||||
"commentStart": 25,
|
||||
"end": 26,
|
||||
"name": "y",
|
||||
"start": 25,
|
||||
@ -74,6 +87,7 @@ expression: actual
|
||||
"start": 25,
|
||||
"type": "ObjectProperty",
|
||||
"value": {
|
||||
"commentStart": 28,
|
||||
"end": 29,
|
||||
"raw": "4",
|
||||
"start": 28,
|
||||
@ -100,6 +114,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 30,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,12 +1,14 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"end": 4,
|
||||
"expression": {
|
||||
"commentStart": 0,
|
||||
"end": 4,
|
||||
"raw": "true",
|
||||
"start": 0,
|
||||
@ -19,6 +21,7 @@ expression: actual
|
||||
"type": "ExpressionStatement"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 4,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,12 +1,14 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"end": 5,
|
||||
"expression": {
|
||||
"commentStart": 0,
|
||||
"end": 5,
|
||||
"name": "truee",
|
||||
"start": 0,
|
||||
@ -18,6 +20,7 @@ expression: actual
|
||||
"type": "ExpressionStatement"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 5,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,13 +1,16 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 9,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 1,
|
||||
"name": "x",
|
||||
"start": 0,
|
||||
@ -15,6 +18,7 @@ expression: actual
|
||||
},
|
||||
"init": {
|
||||
"argument": {
|
||||
"commentStart": 5,
|
||||
"end": 9,
|
||||
"raw": "true",
|
||||
"start": 5,
|
||||
@ -22,6 +26,7 @@ expression: actual
|
||||
"type": "Literal",
|
||||
"value": true
|
||||
},
|
||||
"commentStart": 4,
|
||||
"end": 9,
|
||||
"operator": "!",
|
||||
"start": 4,
|
||||
@ -38,6 +43,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 9,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,21 +1,26 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 16,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 1,
|
||||
"name": "x",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 4,
|
||||
"end": 16,
|
||||
"left": {
|
||||
"commentStart": 4,
|
||||
"end": 8,
|
||||
"raw": "true",
|
||||
"start": 4,
|
||||
@ -25,6 +30,7 @@ expression: actual
|
||||
},
|
||||
"operator": "&",
|
||||
"right": {
|
||||
"commentStart": 11,
|
||||
"end": 16,
|
||||
"raw": "false",
|
||||
"start": 11,
|
||||
@ -46,6 +52,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 16,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,21 +1,26 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 16,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 1,
|
||||
"name": "x",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 4,
|
||||
"end": 16,
|
||||
"left": {
|
||||
"commentStart": 4,
|
||||
"end": 8,
|
||||
"raw": "true",
|
||||
"start": 4,
|
||||
@ -25,6 +30,7 @@ expression: actual
|
||||
},
|
||||
"operator": "|",
|
||||
"right": {
|
||||
"commentStart": 11,
|
||||
"end": 16,
|
||||
"raw": "false",
|
||||
"start": 11,
|
||||
@ -46,6 +52,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 16,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,13 +1,16 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 29,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 5,
|
||||
"name": "myVar",
|
||||
"start": 0,
|
||||
@ -19,6 +22,7 @@ expression: actual
|
||||
"argument": {
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 20,
|
||||
"end": 21,
|
||||
"raw": "5",
|
||||
"start": 20,
|
||||
@ -30,6 +34,7 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 23,
|
||||
"end": 24,
|
||||
"raw": "4",
|
||||
"start": 23,
|
||||
@ -42,16 +47,19 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 13,
|
||||
"end": 19,
|
||||
"name": "legLen",
|
||||
"start": 13,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 13,
|
||||
"end": 25,
|
||||
"start": 13,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
},
|
||||
"commentStart": 12,
|
||||
"end": 25,
|
||||
"operator": "-",
|
||||
"start": 12,
|
||||
@ -59,6 +67,7 @@ expression: actual
|
||||
"type": "UnaryExpression"
|
||||
},
|
||||
{
|
||||
"commentStart": 27,
|
||||
"end": 28,
|
||||
"raw": "5",
|
||||
"start": 27,
|
||||
@ -71,11 +80,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 8,
|
||||
"end": 11,
|
||||
"name": "min",
|
||||
"start": 8,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 8,
|
||||
"end": 29,
|
||||
"start": 8,
|
||||
"type": "CallExpression",
|
||||
@ -91,6 +102,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 29,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,13 +1,16 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 30,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 5,
|
||||
"name": "myVar",
|
||||
"start": 0,
|
||||
@ -16,8 +19,10 @@ expression: actual
|
||||
"init": {
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 8,
|
||||
"end": 13,
|
||||
"left": {
|
||||
"commentStart": 8,
|
||||
"end": 9,
|
||||
"raw": "5",
|
||||
"start": 8,
|
||||
@ -30,6 +35,7 @@ expression: actual
|
||||
},
|
||||
"operator": "+",
|
||||
"right": {
|
||||
"commentStart": 12,
|
||||
"end": 13,
|
||||
"raw": "6",
|
||||
"start": 12,
|
||||
@ -47,6 +53,7 @@ expression: actual
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 24,
|
||||
"end": 26,
|
||||
"raw": "45",
|
||||
"start": 24,
|
||||
@ -58,6 +65,7 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 28,
|
||||
"end": 29,
|
||||
"start": 28,
|
||||
"type": "PipeSubstitution",
|
||||
@ -65,17 +73,20 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 17,
|
||||
"end": 23,
|
||||
"name": "myFunc",
|
||||
"start": 17,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 17,
|
||||
"end": 30,
|
||||
"start": 17,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
}
|
||||
],
|
||||
"commentStart": 8,
|
||||
"end": 30,
|
||||
"start": 8,
|
||||
"type": "PipeExpression",
|
||||
@ -91,6 +102,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 30,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,28 +1,34 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 21,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 1,
|
||||
"name": "x",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 4,
|
||||
"end": 21,
|
||||
"left": {
|
||||
"argument": {
|
||||
"commentStart": 5,
|
||||
"end": 9,
|
||||
"name": "leg2",
|
||||
"start": 5,
|
||||
"type": "Identifier",
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 4,
|
||||
"end": 9,
|
||||
"operator": "-",
|
||||
"start": 4,
|
||||
@ -31,6 +37,7 @@ expression: actual
|
||||
},
|
||||
"operator": "+",
|
||||
"right": {
|
||||
"commentStart": 12,
|
||||
"end": 21,
|
||||
"name": "thickness",
|
||||
"start": 12,
|
||||
@ -51,6 +58,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 21,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,21 +1,26 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 4,
|
||||
"end": 18,
|
||||
"id": {
|
||||
"commentStart": 4,
|
||||
"end": 5,
|
||||
"name": "x",
|
||||
"start": 4,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 8,
|
||||
"end": 18,
|
||||
"left": {
|
||||
"commentStart": 8,
|
||||
"end": 9,
|
||||
"raw": "1",
|
||||
"start": 8,
|
||||
@ -28,8 +33,10 @@ expression: actual
|
||||
},
|
||||
"operator": "*",
|
||||
"right": {
|
||||
"commentStart": 13,
|
||||
"end": 18,
|
||||
"left": {
|
||||
"commentStart": 13,
|
||||
"end": 14,
|
||||
"raw": "3",
|
||||
"start": 13,
|
||||
@ -42,6 +49,7 @@ expression: actual
|
||||
},
|
||||
"operator": "-",
|
||||
"right": {
|
||||
"commentStart": 17,
|
||||
"end": 18,
|
||||
"raw": "4",
|
||||
"start": 17,
|
||||
@ -70,6 +78,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 18,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,19 +1,23 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 5,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 1,
|
||||
"name": "x",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 4,
|
||||
"end": 5,
|
||||
"raw": "1",
|
||||
"start": 4,
|
||||
@ -34,11 +38,13 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 34,
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {
|
||||
"0": [
|
||||
{
|
||||
"commentStart": 5,
|
||||
"end": 34,
|
||||
"start": 5,
|
||||
"type": "NonCodeNode",
|
||||
|
@ -1,13 +1,16 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 3,
|
||||
"end": 58,
|
||||
"id": {
|
||||
"commentStart": 3,
|
||||
"end": 4,
|
||||
"name": "x",
|
||||
"start": 3,
|
||||
@ -18,12 +21,14 @@ expression: actual
|
||||
"body": [
|
||||
{
|
||||
"argument": {
|
||||
"commentStart": 30,
|
||||
"end": 32,
|
||||
"name": "sg",
|
||||
"start": 30,
|
||||
"type": "Identifier",
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 23,
|
||||
"end": 32,
|
||||
"start": 23,
|
||||
"type": "ReturnStatement",
|
||||
@ -31,21 +36,25 @@ expression: actual
|
||||
},
|
||||
{
|
||||
"argument": {
|
||||
"commentStart": 48,
|
||||
"end": 50,
|
||||
"name": "sg",
|
||||
"start": 48,
|
||||
"type": "Identifier",
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 41,
|
||||
"end": 50,
|
||||
"start": 41,
|
||||
"type": "ReturnStatement",
|
||||
"type": "ReturnStatement"
|
||||
}
|
||||
],
|
||||
"commentStart": 13,
|
||||
"end": 58,
|
||||
"start": 13
|
||||
},
|
||||
"commentStart": 7,
|
||||
"end": 58,
|
||||
"params": [],
|
||||
"start": 7,
|
||||
@ -62,6 +71,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 58,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,24 +1,30 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 20,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 3,
|
||||
"name": "obj",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 6,
|
||||
"end": 20,
|
||||
"properties": [
|
||||
{
|
||||
"commentStart": 8,
|
||||
"end": 12,
|
||||
"key": {
|
||||
"commentStart": 8,
|
||||
"end": 9,
|
||||
"name": "a",
|
||||
"start": 8,
|
||||
@ -27,6 +33,7 @@ expression: actual
|
||||
"start": 8,
|
||||
"type": "ObjectProperty",
|
||||
"value": {
|
||||
"commentStart": 11,
|
||||
"end": 12,
|
||||
"raw": "1",
|
||||
"start": 11,
|
||||
@ -39,8 +46,10 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 14,
|
||||
"end": 18,
|
||||
"key": {
|
||||
"commentStart": 14,
|
||||
"end": 15,
|
||||
"name": "b",
|
||||
"start": 14,
|
||||
@ -49,6 +58,7 @@ expression: actual
|
||||
"start": 14,
|
||||
"type": "ObjectProperty",
|
||||
"value": {
|
||||
"commentStart": 17,
|
||||
"end": 18,
|
||||
"raw": "2",
|
||||
"start": 17,
|
||||
@ -75,17 +85,22 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
},
|
||||
{
|
||||
"commentStart": 25,
|
||||
"declaration": {
|
||||
"commentStart": 25,
|
||||
"end": 43,
|
||||
"id": {
|
||||
"commentStart": 25,
|
||||
"end": 31,
|
||||
"name": "height",
|
||||
"start": 25,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 34,
|
||||
"end": 43,
|
||||
"left": {
|
||||
"commentStart": 34,
|
||||
"end": 35,
|
||||
"raw": "1",
|
||||
"start": 34,
|
||||
@ -98,9 +113,11 @@ expression: actual
|
||||
},
|
||||
"operator": "-",
|
||||
"right": {
|
||||
"commentStart": 38,
|
||||
"computed": false,
|
||||
"end": 43,
|
||||
"object": {
|
||||
"commentStart": 38,
|
||||
"end": 41,
|
||||
"name": "obj",
|
||||
"start": 38,
|
||||
@ -108,6 +125,7 @@ expression: actual
|
||||
"type": "Identifier"
|
||||
},
|
||||
"property": {
|
||||
"commentStart": 42,
|
||||
"end": 43,
|
||||
"name": "a",
|
||||
"start": 42,
|
||||
@ -132,6 +150,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 43,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,24 +1,30 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 20,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 3,
|
||||
"name": "obj",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 6,
|
||||
"end": 20,
|
||||
"properties": [
|
||||
{
|
||||
"commentStart": 8,
|
||||
"end": 12,
|
||||
"key": {
|
||||
"commentStart": 8,
|
||||
"end": 9,
|
||||
"name": "a",
|
||||
"start": 8,
|
||||
@ -27,6 +33,7 @@ expression: actual
|
||||
"start": 8,
|
||||
"type": "ObjectProperty",
|
||||
"value": {
|
||||
"commentStart": 11,
|
||||
"end": 12,
|
||||
"raw": "1",
|
||||
"start": 11,
|
||||
@ -39,8 +46,10 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 14,
|
||||
"end": 18,
|
||||
"key": {
|
||||
"commentStart": 14,
|
||||
"end": 15,
|
||||
"name": "b",
|
||||
"start": 14,
|
||||
@ -49,6 +58,7 @@ expression: actual
|
||||
"start": 14,
|
||||
"type": "ObjectProperty",
|
||||
"value": {
|
||||
"commentStart": 17,
|
||||
"end": 18,
|
||||
"raw": "2",
|
||||
"start": 17,
|
||||
@ -75,17 +85,22 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
},
|
||||
{
|
||||
"commentStart": 26,
|
||||
"declaration": {
|
||||
"commentStart": 26,
|
||||
"end": 47,
|
||||
"id": {
|
||||
"commentStart": 26,
|
||||
"end": 32,
|
||||
"name": "height",
|
||||
"start": 26,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 35,
|
||||
"end": 47,
|
||||
"left": {
|
||||
"commentStart": 35,
|
||||
"end": 36,
|
||||
"raw": "1",
|
||||
"start": 35,
|
||||
@ -98,9 +113,11 @@ expression: actual
|
||||
},
|
||||
"operator": "-",
|
||||
"right": {
|
||||
"commentStart": 39,
|
||||
"computed": false,
|
||||
"end": 47,
|
||||
"object": {
|
||||
"commentStart": 39,
|
||||
"end": 42,
|
||||
"name": "obj",
|
||||
"start": 39,
|
||||
@ -108,6 +125,7 @@ expression: actual
|
||||
"type": "Identifier"
|
||||
},
|
||||
"property": {
|
||||
"commentStart": 43,
|
||||
"end": 46,
|
||||
"raw": "\"a\"",
|
||||
"start": 43,
|
||||
@ -133,6 +151,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 47,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,24 +1,30 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 20,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 3,
|
||||
"name": "obj",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 6,
|
||||
"end": 20,
|
||||
"properties": [
|
||||
{
|
||||
"commentStart": 8,
|
||||
"end": 12,
|
||||
"key": {
|
||||
"commentStart": 8,
|
||||
"end": 9,
|
||||
"name": "a",
|
||||
"start": 8,
|
||||
@ -27,6 +33,7 @@ expression: actual
|
||||
"start": 8,
|
||||
"type": "ObjectProperty",
|
||||
"value": {
|
||||
"commentStart": 11,
|
||||
"end": 12,
|
||||
"raw": "1",
|
||||
"start": 11,
|
||||
@ -39,8 +46,10 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 14,
|
||||
"end": 18,
|
||||
"key": {
|
||||
"commentStart": 14,
|
||||
"end": 15,
|
||||
"name": "b",
|
||||
"start": 14,
|
||||
@ -49,6 +58,7 @@ expression: actual
|
||||
"start": 14,
|
||||
"type": "ObjectProperty",
|
||||
"value": {
|
||||
"commentStart": 17,
|
||||
"end": 18,
|
||||
"raw": "2",
|
||||
"start": 17,
|
||||
@ -75,20 +85,26 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
},
|
||||
{
|
||||
"commentStart": 25,
|
||||
"declaration": {
|
||||
"commentStart": 25,
|
||||
"end": 46,
|
||||
"id": {
|
||||
"commentStart": 25,
|
||||
"end": 31,
|
||||
"name": "height",
|
||||
"start": 25,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 34,
|
||||
"end": 46,
|
||||
"left": {
|
||||
"commentStart": 34,
|
||||
"computed": false,
|
||||
"end": 42,
|
||||
"object": {
|
||||
"commentStart": 34,
|
||||
"end": 37,
|
||||
"name": "obj",
|
||||
"start": 34,
|
||||
@ -96,6 +112,7 @@ expression: actual
|
||||
"type": "Identifier"
|
||||
},
|
||||
"property": {
|
||||
"commentStart": 38,
|
||||
"end": 41,
|
||||
"raw": "\"a\"",
|
||||
"start": 38,
|
||||
@ -109,6 +126,7 @@ expression: actual
|
||||
},
|
||||
"operator": "-",
|
||||
"right": {
|
||||
"commentStart": 45,
|
||||
"end": 46,
|
||||
"raw": "1",
|
||||
"start": 45,
|
||||
@ -133,6 +151,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 46,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,24 +1,30 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 20,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 3,
|
||||
"name": "obj",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 6,
|
||||
"end": 20,
|
||||
"properties": [
|
||||
{
|
||||
"commentStart": 8,
|
||||
"end": 12,
|
||||
"key": {
|
||||
"commentStart": 8,
|
||||
"end": 9,
|
||||
"name": "a",
|
||||
"start": 8,
|
||||
@ -27,6 +33,7 @@ expression: actual
|
||||
"start": 8,
|
||||
"type": "ObjectProperty",
|
||||
"value": {
|
||||
"commentStart": 11,
|
||||
"end": 12,
|
||||
"raw": "1",
|
||||
"start": 11,
|
||||
@ -39,8 +46,10 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 14,
|
||||
"end": 18,
|
||||
"key": {
|
||||
"commentStart": 14,
|
||||
"end": 15,
|
||||
"name": "b",
|
||||
"start": 14,
|
||||
@ -49,6 +58,7 @@ expression: actual
|
||||
"start": 14,
|
||||
"type": "ObjectProperty",
|
||||
"value": {
|
||||
"commentStart": 17,
|
||||
"end": 18,
|
||||
"raw": "2",
|
||||
"start": 17,
|
||||
@ -75,19 +85,25 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
},
|
||||
{
|
||||
"commentStart": 25,
|
||||
"declaration": {
|
||||
"commentStart": 25,
|
||||
"end": 51,
|
||||
"id": {
|
||||
"commentStart": 25,
|
||||
"end": 31,
|
||||
"name": "height",
|
||||
"start": 25,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 34,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 35,
|
||||
"end": 47,
|
||||
"left": {
|
||||
"commentStart": 35,
|
||||
"end": 36,
|
||||
"raw": "1",
|
||||
"start": 35,
|
||||
@ -100,9 +116,11 @@ expression: actual
|
||||
},
|
||||
"operator": "-",
|
||||
"right": {
|
||||
"commentStart": 39,
|
||||
"computed": false,
|
||||
"end": 47,
|
||||
"object": {
|
||||
"commentStart": 39,
|
||||
"end": 42,
|
||||
"name": "obj",
|
||||
"start": 39,
|
||||
@ -110,6 +128,7 @@ expression: actual
|
||||
"type": "Identifier"
|
||||
},
|
||||
"property": {
|
||||
"commentStart": 43,
|
||||
"end": 46,
|
||||
"raw": "\"a\"",
|
||||
"start": 43,
|
||||
@ -126,6 +145,7 @@ expression: actual
|
||||
"type": "BinaryExpression"
|
||||
},
|
||||
{
|
||||
"commentStart": 49,
|
||||
"end": 50,
|
||||
"raw": "0",
|
||||
"start": 49,
|
||||
@ -152,6 +172,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 51,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -5,9 +5,12 @@ expression: actual
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 23,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 3,
|
||||
"name": "val",
|
||||
"start": 0,
|
||||
@ -18,12 +21,14 @@ expression: actual
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 10,
|
||||
"end": 11,
|
||||
"name": "x",
|
||||
"start": 10,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 14,
|
||||
"end": 15,
|
||||
"name": "a",
|
||||
"start": 14,
|
||||
@ -34,12 +39,14 @@ expression: actual
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 17,
|
||||
"end": 18,
|
||||
"name": "y",
|
||||
"start": 17,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 21,
|
||||
"end": 22,
|
||||
"name": "b",
|
||||
"start": 21,
|
||||
@ -49,11 +56,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 6,
|
||||
"end": 9,
|
||||
"name": "foo",
|
||||
"start": 6,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 6,
|
||||
"end": 23,
|
||||
"start": 6,
|
||||
"type": "CallExpressionKw",
|
||||
@ -70,6 +79,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 23,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -5,9 +5,12 @@ expression: actual
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 21,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 3,
|
||||
"name": "val",
|
||||
"start": 0,
|
||||
@ -16,6 +19,7 @@ expression: actual
|
||||
"init": {
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 6,
|
||||
"end": 7,
|
||||
"raw": "1",
|
||||
"start": 6,
|
||||
@ -31,12 +35,14 @@ expression: actual
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 13,
|
||||
"end": 16,
|
||||
"name": "arg",
|
||||
"start": 13,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 19,
|
||||
"end": 20,
|
||||
"name": "x",
|
||||
"start": 19,
|
||||
@ -46,11 +52,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 11,
|
||||
"end": 12,
|
||||
"name": "f",
|
||||
"start": 11,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 11,
|
||||
"end": 21,
|
||||
"start": 11,
|
||||
"type": "CallExpressionKw",
|
||||
@ -58,6 +66,7 @@ expression: actual
|
||||
"unlabeled": null
|
||||
}
|
||||
],
|
||||
"commentStart": 6,
|
||||
"end": 21,
|
||||
"start": 6,
|
||||
"type": "PipeExpression",
|
||||
@ -73,6 +82,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 21,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -5,9 +5,12 @@ expression: actual
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 87,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 3,
|
||||
"name": "val",
|
||||
"start": 0,
|
||||
@ -18,12 +21,14 @@ expression: actual
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 22,
|
||||
"end": 25,
|
||||
"name": "arg",
|
||||
"start": 22,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 28,
|
||||
"end": 29,
|
||||
"name": "x",
|
||||
"start": 28,
|
||||
@ -34,12 +39,14 @@ expression: actual
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 44,
|
||||
"end": 47,
|
||||
"name": "foo",
|
||||
"start": 44,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 50,
|
||||
"end": 51,
|
||||
"name": "x",
|
||||
"start": 50,
|
||||
@ -50,12 +57,14 @@ expression: actual
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 66,
|
||||
"end": 69,
|
||||
"name": "bar",
|
||||
"start": 66,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 72,
|
||||
"end": 73,
|
||||
"name": "x",
|
||||
"start": 72,
|
||||
@ -65,11 +74,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 6,
|
||||
"end": 7,
|
||||
"name": "f",
|
||||
"start": 6,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 6,
|
||||
"end": 87,
|
||||
"start": 6,
|
||||
"type": "CallExpressionKw",
|
||||
@ -86,6 +97,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 87,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -5,9 +5,12 @@ expression: actual
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 90,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 3,
|
||||
"name": "val",
|
||||
"start": 0,
|
||||
@ -18,12 +21,14 @@ expression: actual
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 22,
|
||||
"end": 25,
|
||||
"name": "arg",
|
||||
"start": 22,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 28,
|
||||
"end": 29,
|
||||
"name": "x",
|
||||
"start": 28,
|
||||
@ -34,12 +39,14 @@ expression: actual
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 69,
|
||||
"end": 72,
|
||||
"name": "bar",
|
||||
"start": 69,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 75,
|
||||
"end": 76,
|
||||
"name": "x",
|
||||
"start": 75,
|
||||
@ -49,16 +56,19 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 6,
|
||||
"end": 7,
|
||||
"name": "f",
|
||||
"start": 6,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 6,
|
||||
"end": 90,
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {
|
||||
"1": [
|
||||
{
|
||||
"commentStart": 44,
|
||||
"end": 55,
|
||||
"start": 44,
|
||||
"type": "NonCodeNode",
|
||||
@ -87,6 +97,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 90,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,13 +1,16 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 3,
|
||||
"end": 25,
|
||||
"id": {
|
||||
"commentStart": 3,
|
||||
"end": 6,
|
||||
"name": "foo",
|
||||
"start": 3,
|
||||
@ -18,6 +21,7 @@ expression: actual
|
||||
"body": [
|
||||
{
|
||||
"argument": {
|
||||
"commentStart": 22,
|
||||
"end": 23,
|
||||
"raw": "1",
|
||||
"start": 22,
|
||||
@ -28,20 +32,24 @@ expression: actual
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
"commentStart": 15,
|
||||
"end": 23,
|
||||
"start": 15,
|
||||
"type": "ReturnStatement",
|
||||
"type": "ReturnStatement"
|
||||
}
|
||||
],
|
||||
"commentStart": 13,
|
||||
"end": 25,
|
||||
"start": 13
|
||||
},
|
||||
"commentStart": 6,
|
||||
"end": 25,
|
||||
"params": [
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": {
|
||||
"commentStart": 7,
|
||||
"end": 8,
|
||||
"name": "x",
|
||||
"start": 7,
|
||||
@ -51,6 +59,7 @@ expression: actual
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": {
|
||||
"commentStart": 10,
|
||||
"end": 11,
|
||||
"name": "y",
|
||||
"start": 10,
|
||||
@ -72,6 +81,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 25,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,13 +1,16 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 3,
|
||||
"end": 26,
|
||||
"id": {
|
||||
"commentStart": 3,
|
||||
"end": 6,
|
||||
"name": "foo",
|
||||
"start": 3,
|
||||
@ -18,6 +21,7 @@ expression: actual
|
||||
"body": [
|
||||
{
|
||||
"argument": {
|
||||
"commentStart": 23,
|
||||
"end": 24,
|
||||
"raw": "1",
|
||||
"start": 23,
|
||||
@ -28,20 +32,24 @@ expression: actual
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
"commentStart": 16,
|
||||
"end": 24,
|
||||
"start": 16,
|
||||
"type": "ReturnStatement",
|
||||
"type": "ReturnStatement"
|
||||
}
|
||||
],
|
||||
"commentStart": 14,
|
||||
"end": 26,
|
||||
"start": 14
|
||||
},
|
||||
"commentStart": 6,
|
||||
"end": 26,
|
||||
"params": [
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": {
|
||||
"commentStart": 8,
|
||||
"end": 9,
|
||||
"name": "x",
|
||||
"start": 8,
|
||||
@ -52,6 +60,7 @@ expression: actual
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": {
|
||||
"commentStart": 11,
|
||||
"end": 12,
|
||||
"name": "y",
|
||||
"start": 11,
|
||||
@ -73,6 +82,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 26,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,13 +1,16 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 3,
|
||||
"end": 35,
|
||||
"id": {
|
||||
"commentStart": 3,
|
||||
"end": 6,
|
||||
"name": "foo",
|
||||
"start": 3,
|
||||
@ -18,6 +21,7 @@ expression: actual
|
||||
"body": [
|
||||
{
|
||||
"argument": {
|
||||
"commentStart": 32,
|
||||
"end": 33,
|
||||
"raw": "1",
|
||||
"start": 32,
|
||||
@ -28,26 +32,31 @@ expression: actual
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
"commentStart": 25,
|
||||
"end": 33,
|
||||
"start": 25,
|
||||
"type": "ReturnStatement",
|
||||
"type": "ReturnStatement"
|
||||
}
|
||||
],
|
||||
"commentStart": 23,
|
||||
"end": 35,
|
||||
"start": 23
|
||||
},
|
||||
"commentStart": 6,
|
||||
"end": 35,
|
||||
"params": [
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": {
|
||||
"commentStart": 7,
|
||||
"end": 8,
|
||||
"name": "x",
|
||||
"start": 7,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"default_value": {
|
||||
"commentStart": 20,
|
||||
"end": 21,
|
||||
"raw": "2",
|
||||
"start": 20,
|
||||
@ -74,6 +83,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 35,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,13 +1,16 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 3,
|
||||
"end": 27,
|
||||
"id": {
|
||||
"commentStart": 3,
|
||||
"end": 6,
|
||||
"name": "foo",
|
||||
"start": 3,
|
||||
@ -18,6 +21,7 @@ expression: actual
|
||||
"body": [
|
||||
{
|
||||
"argument": {
|
||||
"commentStart": 24,
|
||||
"end": 25,
|
||||
"raw": "1",
|
||||
"start": 24,
|
||||
@ -28,26 +32,31 @@ expression: actual
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
"commentStart": 17,
|
||||
"end": 25,
|
||||
"start": 17,
|
||||
"type": "ReturnStatement",
|
||||
"type": "ReturnStatement"
|
||||
}
|
||||
],
|
||||
"commentStart": 15,
|
||||
"end": 27,
|
||||
"start": 15
|
||||
},
|
||||
"commentStart": 6,
|
||||
"end": 27,
|
||||
"params": [
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": {
|
||||
"commentStart": 7,
|
||||
"end": 8,
|
||||
"name": "x",
|
||||
"start": 7,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"default_value": {
|
||||
"commentStart": 12,
|
||||
"end": 13,
|
||||
"raw": "2",
|
||||
"start": 12,
|
||||
@ -74,6 +83,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 27,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -5,9 +5,12 @@ expression: actual
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 19,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 3,
|
||||
"name": "val",
|
||||
"start": 0,
|
||||
@ -18,12 +21,14 @@ expression: actual
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 13,
|
||||
"end": 14,
|
||||
"name": "y",
|
||||
"start": 13,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 17,
|
||||
"end": 18,
|
||||
"name": "z",
|
||||
"start": 17,
|
||||
@ -33,16 +38,19 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 6,
|
||||
"end": 9,
|
||||
"name": "foo",
|
||||
"start": 6,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 6,
|
||||
"end": 19,
|
||||
"start": 6,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": {
|
||||
"commentStart": 10,
|
||||
"end": 11,
|
||||
"name": "x",
|
||||
"start": 10,
|
||||
@ -60,6 +68,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 19,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,24 +1,30 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 20,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 3,
|
||||
"name": "obj",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 6,
|
||||
"end": 20,
|
||||
"properties": [
|
||||
{
|
||||
"commentStart": 8,
|
||||
"end": 12,
|
||||
"key": {
|
||||
"commentStart": 8,
|
||||
"end": 9,
|
||||
"name": "a",
|
||||
"start": 8,
|
||||
@ -27,6 +33,7 @@ expression: actual
|
||||
"start": 8,
|
||||
"type": "ObjectProperty",
|
||||
"value": {
|
||||
"commentStart": 11,
|
||||
"end": 12,
|
||||
"raw": "1",
|
||||
"start": 11,
|
||||
@ -39,8 +46,10 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 14,
|
||||
"end": 18,
|
||||
"key": {
|
||||
"commentStart": 14,
|
||||
"end": 15,
|
||||
"name": "b",
|
||||
"start": 14,
|
||||
@ -49,6 +58,7 @@ expression: actual
|
||||
"start": 14,
|
||||
"type": "ObjectProperty",
|
||||
"value": {
|
||||
"commentStart": 17,
|
||||
"end": 18,
|
||||
"raw": "2",
|
||||
"start": 17,
|
||||
@ -75,22 +85,29 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
},
|
||||
{
|
||||
"commentStart": 25,
|
||||
"declaration": {
|
||||
"commentStart": 25,
|
||||
"end": 51,
|
||||
"id": {
|
||||
"commentStart": 25,
|
||||
"end": 31,
|
||||
"name": "height",
|
||||
"start": 25,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 34,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 35,
|
||||
"end": 47,
|
||||
"left": {
|
||||
"commentStart": 35,
|
||||
"computed": false,
|
||||
"end": 43,
|
||||
"object": {
|
||||
"commentStart": 35,
|
||||
"end": 38,
|
||||
"name": "obj",
|
||||
"start": 35,
|
||||
@ -98,6 +115,7 @@ expression: actual
|
||||
"type": "Identifier"
|
||||
},
|
||||
"property": {
|
||||
"commentStart": 39,
|
||||
"end": 42,
|
||||
"raw": "\"a\"",
|
||||
"start": 39,
|
||||
@ -111,6 +129,7 @@ expression: actual
|
||||
},
|
||||
"operator": "-",
|
||||
"right": {
|
||||
"commentStart": 46,
|
||||
"end": 47,
|
||||
"raw": "1",
|
||||
"start": 46,
|
||||
@ -126,6 +145,7 @@ expression: actual
|
||||
"type": "BinaryExpression"
|
||||
},
|
||||
{
|
||||
"commentStart": 49,
|
||||
"end": 50,
|
||||
"raw": "0",
|
||||
"start": 49,
|
||||
@ -152,6 +172,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 51,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,24 +1,30 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 20,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 3,
|
||||
"name": "obj",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 6,
|
||||
"end": 20,
|
||||
"properties": [
|
||||
{
|
||||
"commentStart": 8,
|
||||
"end": 12,
|
||||
"key": {
|
||||
"commentStart": 8,
|
||||
"end": 9,
|
||||
"name": "a",
|
||||
"start": 8,
|
||||
@ -27,6 +33,7 @@ expression: actual
|
||||
"start": 8,
|
||||
"type": "ObjectProperty",
|
||||
"value": {
|
||||
"commentStart": 11,
|
||||
"end": 12,
|
||||
"raw": "1",
|
||||
"start": 11,
|
||||
@ -39,8 +46,10 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 14,
|
||||
"end": 18,
|
||||
"key": {
|
||||
"commentStart": 14,
|
||||
"end": 15,
|
||||
"name": "b",
|
||||
"start": 14,
|
||||
@ -49,6 +58,7 @@ expression: actual
|
||||
"start": 14,
|
||||
"type": "ObjectProperty",
|
||||
"value": {
|
||||
"commentStart": 17,
|
||||
"end": 18,
|
||||
"raw": "2",
|
||||
"start": 17,
|
||||
@ -75,22 +85,29 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
},
|
||||
{
|
||||
"commentStart": 25,
|
||||
"declaration": {
|
||||
"commentStart": 25,
|
||||
"end": 50,
|
||||
"id": {
|
||||
"commentStart": 25,
|
||||
"end": 31,
|
||||
"name": "height",
|
||||
"start": 25,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 34,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 35,
|
||||
"end": 46,
|
||||
"left": {
|
||||
"commentStart": 35,
|
||||
"computed": false,
|
||||
"end": 43,
|
||||
"object": {
|
||||
"commentStart": 35,
|
||||
"end": 38,
|
||||
"name": "obj",
|
||||
"start": 35,
|
||||
@ -98,6 +115,7 @@ expression: actual
|
||||
"type": "Identifier"
|
||||
},
|
||||
"property": {
|
||||
"commentStart": 39,
|
||||
"end": 42,
|
||||
"raw": "\"a\"",
|
||||
"start": 39,
|
||||
@ -111,6 +129,7 @@ expression: actual
|
||||
},
|
||||
"operator": "-",
|
||||
"right": {
|
||||
"commentStart": 45,
|
||||
"end": 46,
|
||||
"raw": "1",
|
||||
"start": 45,
|
||||
@ -126,6 +145,7 @@ expression: actual
|
||||
"type": "BinaryExpression"
|
||||
},
|
||||
{
|
||||
"commentStart": 48,
|
||||
"end": 49,
|
||||
"raw": "0",
|
||||
"start": 48,
|
||||
@ -152,6 +172,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 50,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,21 +1,26 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 18,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 6,
|
||||
"name": "height",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 9,
|
||||
"end": 18,
|
||||
"left": {
|
||||
"commentStart": 9,
|
||||
"end": 10,
|
||||
"raw": "1",
|
||||
"start": 9,
|
||||
@ -28,9 +33,11 @@ expression: actual
|
||||
},
|
||||
"operator": "-",
|
||||
"right": {
|
||||
"commentStart": 13,
|
||||
"computed": false,
|
||||
"end": 18,
|
||||
"object": {
|
||||
"commentStart": 13,
|
||||
"end": 16,
|
||||
"name": "obj",
|
||||
"start": 13,
|
||||
@ -38,6 +45,7 @@ expression: actual
|
||||
"type": "Identifier"
|
||||
},
|
||||
"property": {
|
||||
"commentStart": 17,
|
||||
"end": 18,
|
||||
"name": "a",
|
||||
"start": 17,
|
||||
@ -62,6 +70,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 18,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,23 +1,29 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 15,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 3,
|
||||
"name": "six",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 6,
|
||||
"end": 15,
|
||||
"left": {
|
||||
"commentStart": 6,
|
||||
"end": 11,
|
||||
"left": {
|
||||
"commentStart": 6,
|
||||
"end": 7,
|
||||
"raw": "1",
|
||||
"start": 6,
|
||||
@ -30,6 +36,7 @@ expression: actual
|
||||
},
|
||||
"operator": "+",
|
||||
"right": {
|
||||
"commentStart": 10,
|
||||
"end": 11,
|
||||
"raw": "2",
|
||||
"start": 10,
|
||||
@ -46,6 +53,7 @@ expression: actual
|
||||
},
|
||||
"operator": "+",
|
||||
"right": {
|
||||
"commentStart": 14,
|
||||
"end": 15,
|
||||
"raw": "3",
|
||||
"start": 14,
|
||||
@ -70,6 +78,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 15,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,23 +1,29 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 16,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 4,
|
||||
"name": "five",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 7,
|
||||
"end": 16,
|
||||
"left": {
|
||||
"commentStart": 7,
|
||||
"end": 12,
|
||||
"left": {
|
||||
"commentStart": 7,
|
||||
"end": 8,
|
||||
"raw": "3",
|
||||
"start": 7,
|
||||
@ -30,6 +36,7 @@ expression: actual
|
||||
},
|
||||
"operator": "*",
|
||||
"right": {
|
||||
"commentStart": 11,
|
||||
"end": 12,
|
||||
"raw": "1",
|
||||
"start": 11,
|
||||
@ -46,6 +53,7 @@ expression: actual
|
||||
},
|
||||
"operator": "+",
|
||||
"right": {
|
||||
"commentStart": 15,
|
||||
"end": 16,
|
||||
"raw": "2",
|
||||
"start": 15,
|
||||
@ -70,6 +78,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 16,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,24 +1,30 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 24,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 6,
|
||||
"name": "height",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 9,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 11,
|
||||
"computed": false,
|
||||
"end": 19,
|
||||
"object": {
|
||||
"commentStart": 11,
|
||||
"end": 14,
|
||||
"name": "obj",
|
||||
"start": 11,
|
||||
@ -26,6 +32,7 @@ expression: actual
|
||||
"type": "Identifier"
|
||||
},
|
||||
"property": {
|
||||
"commentStart": 15,
|
||||
"end": 18,
|
||||
"raw": "\"a\"",
|
||||
"start": 15,
|
||||
@ -38,6 +45,7 @@ expression: actual
|
||||
"type": "MemberExpression"
|
||||
},
|
||||
{
|
||||
"commentStart": 21,
|
||||
"end": 22,
|
||||
"raw": "0",
|
||||
"start": 21,
|
||||
@ -64,6 +72,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 24,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,24 +1,30 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 20,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 3,
|
||||
"name": "obj",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 6,
|
||||
"end": 20,
|
||||
"properties": [
|
||||
{
|
||||
"commentStart": 8,
|
||||
"end": 12,
|
||||
"key": {
|
||||
"commentStart": 8,
|
||||
"end": 9,
|
||||
"name": "a",
|
||||
"start": 8,
|
||||
@ -27,6 +33,7 @@ expression: actual
|
||||
"start": 8,
|
||||
"type": "ObjectProperty",
|
||||
"value": {
|
||||
"commentStart": 11,
|
||||
"end": 12,
|
||||
"raw": "1",
|
||||
"start": 11,
|
||||
@ -39,8 +46,10 @@ expression: actual
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 14,
|
||||
"end": 18,
|
||||
"key": {
|
||||
"commentStart": 14,
|
||||
"end": 15,
|
||||
"name": "b",
|
||||
"start": 14,
|
||||
@ -49,6 +58,7 @@ expression: actual
|
||||
"start": 14,
|
||||
"type": "ObjectProperty",
|
||||
"value": {
|
||||
"commentStart": 17,
|
||||
"end": 18,
|
||||
"raw": "2",
|
||||
"start": 17,
|
||||
@ -75,18 +85,23 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
},
|
||||
{
|
||||
"commentStart": 25,
|
||||
"declaration": {
|
||||
"commentStart": 25,
|
||||
"end": 42,
|
||||
"id": {
|
||||
"commentStart": 25,
|
||||
"end": 31,
|
||||
"name": "height",
|
||||
"start": 25,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 34,
|
||||
"computed": false,
|
||||
"end": 42,
|
||||
"object": {
|
||||
"commentStart": 34,
|
||||
"end": 37,
|
||||
"name": "obj",
|
||||
"start": 34,
|
||||
@ -94,6 +109,7 @@ expression: actual
|
||||
"type": "Identifier"
|
||||
},
|
||||
"property": {
|
||||
"commentStart": 38,
|
||||
"end": 41,
|
||||
"raw": "\"a\"",
|
||||
"start": 38,
|
||||
@ -115,6 +131,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 42,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,25 +1,31 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 21,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 4,
|
||||
"name": "prop",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 7,
|
||||
"computed": true,
|
||||
"end": 21,
|
||||
"object": {
|
||||
"commentStart": 7,
|
||||
"computed": false,
|
||||
"end": 16,
|
||||
"object": {
|
||||
"commentStart": 7,
|
||||
"end": 9,
|
||||
"name": "yo",
|
||||
"start": 7,
|
||||
@ -27,6 +33,7 @@ expression: actual
|
||||
"type": "Identifier"
|
||||
},
|
||||
"property": {
|
||||
"commentStart": 10,
|
||||
"end": 15,
|
||||
"raw": "\"one\"",
|
||||
"start": 10,
|
||||
@ -39,6 +46,7 @@ expression: actual
|
||||
"type": "MemberExpression"
|
||||
},
|
||||
"property": {
|
||||
"commentStart": 17,
|
||||
"end": 20,
|
||||
"name": "two",
|
||||
"start": 17,
|
||||
@ -59,6 +67,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 21,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,22 +1,27 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 11,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 3,
|
||||
"name": "pt1",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 6,
|
||||
"computed": true,
|
||||
"end": 11,
|
||||
"object": {
|
||||
"commentStart": 6,
|
||||
"end": 8,
|
||||
"name": "b1",
|
||||
"start": 6,
|
||||
@ -24,6 +29,7 @@ expression: actual
|
||||
"type": "Identifier"
|
||||
},
|
||||
"property": {
|
||||
"commentStart": 9,
|
||||
"end": 10,
|
||||
"name": "x",
|
||||
"start": 9,
|
||||
@ -44,6 +50,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 11,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,31 +1,39 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 28,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 4,
|
||||
"name": "prop",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 7,
|
||||
"computed": false,
|
||||
"end": 28,
|
||||
"object": {
|
||||
"commentStart": 7,
|
||||
"computed": false,
|
||||
"end": 23,
|
||||
"object": {
|
||||
"commentStart": 7,
|
||||
"computed": false,
|
||||
"end": 17,
|
||||
"object": {
|
||||
"commentStart": 7,
|
||||
"computed": false,
|
||||
"end": 13,
|
||||
"object": {
|
||||
"commentStart": 7,
|
||||
"end": 9,
|
||||
"name": "yo",
|
||||
"start": 7,
|
||||
@ -33,6 +41,7 @@ expression: actual
|
||||
"type": "Identifier"
|
||||
},
|
||||
"property": {
|
||||
"commentStart": 10,
|
||||
"end": 13,
|
||||
"name": "one",
|
||||
"start": 10,
|
||||
@ -44,6 +53,7 @@ expression: actual
|
||||
"type": "MemberExpression"
|
||||
},
|
||||
"property": {
|
||||
"commentStart": 14,
|
||||
"end": 17,
|
||||
"name": "two",
|
||||
"start": 14,
|
||||
@ -55,6 +65,7 @@ expression: actual
|
||||
"type": "MemberExpression"
|
||||
},
|
||||
"property": {
|
||||
"commentStart": 18,
|
||||
"end": 23,
|
||||
"name": "three",
|
||||
"start": 18,
|
||||
@ -66,6 +77,7 @@ expression: actual
|
||||
"type": "MemberExpression"
|
||||
},
|
||||
"property": {
|
||||
"commentStart": 24,
|
||||
"end": 28,
|
||||
"name": "four",
|
||||
"start": 24,
|
||||
@ -86,6 +98,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 28,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,22 +1,27 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 11,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 3,
|
||||
"name": "pt1",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 6,
|
||||
"computed": false,
|
||||
"end": 11,
|
||||
"object": {
|
||||
"commentStart": 6,
|
||||
"end": 8,
|
||||
"name": "b1",
|
||||
"start": 6,
|
||||
@ -24,6 +29,7 @@ expression: actual
|
||||
"type": "Identifier"
|
||||
},
|
||||
"property": {
|
||||
"commentStart": 9,
|
||||
"end": 10,
|
||||
"raw": "0",
|
||||
"start": 9,
|
||||
@ -48,6 +54,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 11,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,22 +1,27 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 16,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 3,
|
||||
"name": "pt1",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 6,
|
||||
"computed": false,
|
||||
"end": 16,
|
||||
"object": {
|
||||
"commentStart": 6,
|
||||
"end": 8,
|
||||
"name": "b1",
|
||||
"start": 6,
|
||||
@ -24,6 +29,7 @@ expression: actual
|
||||
"type": "Identifier"
|
||||
},
|
||||
"property": {
|
||||
"commentStart": 9,
|
||||
"end": 15,
|
||||
"raw": "'zero'",
|
||||
"start": 9,
|
||||
@ -45,6 +51,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 16,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -1,22 +1,27 @@
|
||||
---
|
||||
source: kcl/src/parsing/parser.rs
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 13,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 3,
|
||||
"name": "pt1",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 6,
|
||||
"computed": false,
|
||||
"end": 13,
|
||||
"object": {
|
||||
"commentStart": 6,
|
||||
"end": 8,
|
||||
"name": "b1",
|
||||
"start": 6,
|
||||
@ -24,6 +29,7 @@ expression: actual
|
||||
"type": "Identifier"
|
||||
},
|
||||
"property": {
|
||||
"commentStart": 9,
|
||||
"end": 13,
|
||||
"name": "zero",
|
||||
"start": 9,
|
||||
@ -44,6 +50,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 13,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -5,9 +5,12 @@ expression: actual
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 48,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 2,
|
||||
"name": "sg",
|
||||
"start": 0,
|
||||
@ -18,6 +21,7 @@ expression: actual
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 19,
|
||||
"end": 21,
|
||||
"name": "XY",
|
||||
"start": 19,
|
||||
@ -26,11 +30,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 5,
|
||||
"end": 18,
|
||||
"name": "startSketchOn",
|
||||
"start": 5,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 5,
|
||||
"end": 22,
|
||||
"start": 5,
|
||||
"type": "CallExpression",
|
||||
@ -39,6 +45,7 @@ expression: actual
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 41,
|
||||
"end": 44,
|
||||
"name": "pos",
|
||||
"start": 41,
|
||||
@ -46,6 +53,7 @@ expression: actual
|
||||
"type": "Identifier"
|
||||
},
|
||||
{
|
||||
"commentStart": 46,
|
||||
"end": 47,
|
||||
"start": 46,
|
||||
"type": "PipeSubstitution",
|
||||
@ -53,17 +61,20 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 26,
|
||||
"end": 40,
|
||||
"name": "startProfileAt",
|
||||
"start": 26,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 26,
|
||||
"end": 48,
|
||||
"start": 26,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
}
|
||||
],
|
||||
"commentStart": 5,
|
||||
"end": 48,
|
||||
"start": 5,
|
||||
"type": "PipeExpression",
|
||||
@ -79,6 +90,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 48,
|
||||
"start": 0
|
||||
}
|
||||
|
@ -5,9 +5,12 @@ expression: actual
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 73,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 2,
|
||||
"name": "sg",
|
||||
"start": 0,
|
||||
@ -18,6 +21,7 @@ expression: actual
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 19,
|
||||
"end": 21,
|
||||
"name": "XY",
|
||||
"start": 19,
|
||||
@ -26,11 +30,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 5,
|
||||
"end": 18,
|
||||
"name": "startSketchOn",
|
||||
"start": 5,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 5,
|
||||
"end": 22,
|
||||
"start": 5,
|
||||
"type": "CallExpression",
|
||||
@ -39,6 +45,7 @@ expression: actual
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 45,
|
||||
"end": 48,
|
||||
"name": "pos",
|
||||
"start": 45,
|
||||
@ -47,11 +54,13 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 30,
|
||||
"end": 44,
|
||||
"name": "startProfileAt",
|
||||
"start": 30,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 30,
|
||||
"end": 49,
|
||||
"start": 30,
|
||||
"type": "CallExpression",
|
||||
@ -60,8 +69,10 @@ expression: actual
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 58,
|
||||
"elements": [
|
||||
{
|
||||
"commentStart": 59,
|
||||
"end": 60,
|
||||
"raw": "0",
|
||||
"start": 59,
|
||||
@ -74,12 +85,14 @@ expression: actual
|
||||
},
|
||||
{
|
||||
"argument": {
|
||||
"commentStart": 63,
|
||||
"end": 68,
|
||||
"name": "scale",
|
||||
"start": 63,
|
||||
"type": "Identifier",
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 62,
|
||||
"end": 68,
|
||||
"operator": "-",
|
||||
"start": 62,
|
||||
@ -93,6 +106,7 @@ expression: actual
|
||||
"type": "ArrayExpression"
|
||||
},
|
||||
{
|
||||
"commentStart": 71,
|
||||
"end": 72,
|
||||
"start": 71,
|
||||
"type": "PipeSubstitution",
|
||||
@ -100,17 +114,20 @@ expression: actual
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"commentStart": 53,
|
||||
"end": 57,
|
||||
"name": "line",
|
||||
"start": 53,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"commentStart": 53,
|
||||
"end": 73,
|
||||
"start": 53,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
}
|
||||
],
|
||||
"commentStart": 5,
|
||||
"end": 73,
|
||||
"start": 5,
|
||||
"type": "PipeExpression",
|
||||
@ -126,6 +143,7 @@ expression: actual
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 73,
|
||||
"start": 0
|
||||
}
|
||||
|
Reference in New Issue
Block a user