Add a position-independent digest of the AST (#2962)
Each AST node contains an Option<Digest> which can be optionally set by running compute_digest() over the AST. This will mutate the AST and set the Digest. Fundamentally, the digest is computed from the digest of AST children nodes (using compute_digest) or the explicit raw underlying value. The underlying hash is changeable by modifying the macro and Digest type alias, and should enable us to determine when an AST -- or fragment of AST -- is the same. This won't hash the start/end of the AST fragment, so it's, to some extent, position independent. It will hash newlines, comments, etc, which may change in the future depending on how we wind up using this.
This commit is contained in:
@ -29,7 +29,9 @@ export class KclManager {
|
||||
nonCodeMeta: {
|
||||
nonCodeNodes: {},
|
||||
start: [],
|
||||
digest: null,
|
||||
},
|
||||
digest: null,
|
||||
}
|
||||
private _programMemory: ProgramMemory = {
|
||||
root: {},
|
||||
@ -160,7 +162,9 @@ export class KclManager {
|
||||
nonCodeMeta: {
|
||||
nonCodeNodes: {},
|
||||
start: [],
|
||||
digest: null,
|
||||
},
|
||||
digest: null,
|
||||
}
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -167,6 +167,7 @@ const sk2 = startSketchOn('XY')
|
||||
start: 114,
|
||||
type: 'TagDeclarator',
|
||||
value: 'p',
|
||||
digest: null,
|
||||
},
|
||||
id: expect.any(String),
|
||||
sourceRange: [95, 117],
|
||||
@ -216,6 +217,7 @@ const sk2 = startSketchOn('XY')
|
||||
start: 114,
|
||||
type: 'TagDeclarator',
|
||||
value: 'p',
|
||||
digest: null,
|
||||
},
|
||||
__geoMeta: {
|
||||
id: expect.any(String),
|
||||
@ -258,6 +260,7 @@ const sk2 = startSketchOn('XY')
|
||||
start: 417,
|
||||
type: 'TagDeclarator',
|
||||
value: 'o',
|
||||
digest: null,
|
||||
},
|
||||
id: expect.any(String),
|
||||
sourceRange: [399, 420],
|
||||
@ -307,6 +310,7 @@ const sk2 = startSketchOn('XY')
|
||||
start: 417,
|
||||
type: 'TagDeclarator',
|
||||
value: 'o',
|
||||
digest: null,
|
||||
},
|
||||
__geoMeta: {
|
||||
id: expect.any(String),
|
||||
|
@ -67,6 +67,7 @@ const newVar = myVar + 1`
|
||||
start: 89,
|
||||
type: 'TagDeclarator',
|
||||
value: 'myPath',
|
||||
digest: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -92,6 +93,7 @@ const newVar = myVar + 1`
|
||||
start: 144,
|
||||
type: 'TagDeclarator',
|
||||
value: 'rightPath',
|
||||
digest: null,
|
||||
},
|
||||
},
|
||||
])
|
||||
@ -190,6 +192,7 @@ const newVar = myVar + 1`
|
||||
start: 109,
|
||||
type: 'TagDeclarator',
|
||||
value: 'myPath',
|
||||
digest: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -99,15 +99,15 @@ describe('Testing findUniqueName', () => {
|
||||
it('should find a unique name', () => {
|
||||
const result = findUniqueName(
|
||||
JSON.stringify([
|
||||
{ type: 'Identifier', name: 'yo01', start: 0, end: 0 },
|
||||
{ type: 'Identifier', name: 'yo02', start: 0, end: 0 },
|
||||
{ type: 'Identifier', name: 'yo03', start: 0, end: 0 },
|
||||
{ type: 'Identifier', name: 'yo04', start: 0, end: 0 },
|
||||
{ type: 'Identifier', name: 'yo05', start: 0, end: 0 },
|
||||
{ type: 'Identifier', name: 'yo06', start: 0, end: 0 },
|
||||
{ type: 'Identifier', name: 'yo07', start: 0, end: 0 },
|
||||
{ type: 'Identifier', name: 'yo08', start: 0, end: 0 },
|
||||
{ type: 'Identifier', name: 'yo09', start: 0, end: 0 },
|
||||
{ type: 'Identifier', name: 'yo01', start: 0, end: 0, digest: null },
|
||||
{ type: 'Identifier', name: 'yo02', start: 0, end: 0, digest: null },
|
||||
{ type: 'Identifier', name: 'yo03', start: 0, end: 0, digest: null },
|
||||
{ type: 'Identifier', name: 'yo04', start: 0, end: 0, digest: null },
|
||||
{ type: 'Identifier', name: 'yo05', start: 0, end: 0, digest: null },
|
||||
{ type: 'Identifier', name: 'yo06', start: 0, end: 0, digest: null },
|
||||
{ type: 'Identifier', name: 'yo07', start: 0, end: 0, digest: null },
|
||||
{ type: 'Identifier', name: 'yo08', start: 0, end: 0, digest: null },
|
||||
{ type: 'Identifier', name: 'yo09', start: 0, end: 0, digest: null },
|
||||
] satisfies Identifier[]),
|
||||
'yo',
|
||||
2
|
||||
@ -122,7 +122,8 @@ describe('Testing addSketchTo', () => {
|
||||
body: [],
|
||||
start: 0,
|
||||
end: 0,
|
||||
nonCodeMeta: { nonCodeNodes: {}, start: [] },
|
||||
nonCodeMeta: { nonCodeNodes: {}, start: [], digest: null },
|
||||
digest: null,
|
||||
},
|
||||
'yz'
|
||||
)
|
||||
|
@ -243,6 +243,7 @@ export function mutateObjExpProp(
|
||||
value: updateWith,
|
||||
start: 0,
|
||||
end: 0,
|
||||
digest: null,
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -484,6 +485,7 @@ export function createLiteral(value: string | number): Literal {
|
||||
end: 0,
|
||||
value,
|
||||
raw: `${value}`,
|
||||
digest: null,
|
||||
}
|
||||
}
|
||||
|
||||
@ -492,6 +494,7 @@ export function createTagDeclarator(value: string): TagDeclarator {
|
||||
type: 'TagDeclarator',
|
||||
start: 0,
|
||||
end: 0,
|
||||
digest: null,
|
||||
value,
|
||||
}
|
||||
}
|
||||
@ -501,6 +504,7 @@ export function createIdentifier(name: string): Identifier {
|
||||
type: 'Identifier',
|
||||
start: 0,
|
||||
end: 0,
|
||||
digest: null,
|
||||
name,
|
||||
}
|
||||
}
|
||||
@ -510,6 +514,7 @@ export function createPipeSubstitution(): PipeSubstitution {
|
||||
type: 'PipeSubstitution',
|
||||
start: 0,
|
||||
end: 0,
|
||||
digest: null,
|
||||
}
|
||||
}
|
||||
|
||||
@ -525,10 +530,12 @@ export function createCallExpressionStdLib(
|
||||
type: 'Identifier',
|
||||
start: 0,
|
||||
end: 0,
|
||||
digest: null,
|
||||
name,
|
||||
},
|
||||
optional: false,
|
||||
arguments: args,
|
||||
digest: null,
|
||||
}
|
||||
}
|
||||
|
||||
@ -544,10 +551,12 @@ export function createCallExpression(
|
||||
type: 'Identifier',
|
||||
start: 0,
|
||||
end: 0,
|
||||
digest: null,
|
||||
name,
|
||||
},
|
||||
optional: false,
|
||||
arguments: args,
|
||||
digest: null,
|
||||
}
|
||||
}
|
||||
|
||||
@ -558,6 +567,7 @@ export function createArrayExpression(
|
||||
type: 'ArrayExpression',
|
||||
start: 0,
|
||||
end: 0,
|
||||
digest: null,
|
||||
elements,
|
||||
}
|
||||
}
|
||||
@ -569,8 +579,9 @@ export function createPipeExpression(
|
||||
type: 'PipeExpression',
|
||||
start: 0,
|
||||
end: 0,
|
||||
digest: null,
|
||||
body,
|
||||
nonCodeMeta: { nonCodeNodes: {}, start: [] },
|
||||
nonCodeMeta: { nonCodeNodes: {}, start: [], digest: null },
|
||||
}
|
||||
}
|
||||
|
||||
@ -583,11 +594,13 @@ export function createVariableDeclaration(
|
||||
type: 'VariableDeclaration',
|
||||
start: 0,
|
||||
end: 0,
|
||||
digest: null,
|
||||
declarations: [
|
||||
{
|
||||
type: 'VariableDeclarator',
|
||||
start: 0,
|
||||
end: 0,
|
||||
digest: null,
|
||||
id: createIdentifier(varName),
|
||||
init,
|
||||
},
|
||||
@ -603,11 +616,13 @@ export function createObjectExpression(properties: {
|
||||
type: 'ObjectExpression',
|
||||
start: 0,
|
||||
end: 0,
|
||||
digest: null,
|
||||
properties: Object.entries(properties).map(([key, value]) => ({
|
||||
type: 'ObjectProperty',
|
||||
start: 0,
|
||||
end: 0,
|
||||
key: createIdentifier(key),
|
||||
digest: null,
|
||||
value,
|
||||
})),
|
||||
}
|
||||
@ -621,6 +636,7 @@ export function createUnaryExpression(
|
||||
type: 'UnaryExpression',
|
||||
start: 0,
|
||||
end: 0,
|
||||
digest: null,
|
||||
operator,
|
||||
argument,
|
||||
}
|
||||
@ -635,6 +651,7 @@ export function createBinaryExpression([left, operator, right]: [
|
||||
type: 'BinaryExpression',
|
||||
start: 0,
|
||||
end: 0,
|
||||
digest: null,
|
||||
operator,
|
||||
left,
|
||||
right,
|
||||
|
@ -1536,9 +1536,11 @@ export const updateStartProfileAtArgs: SketchLineHelper['updateArgs'] = ({
|
||||
start: 0,
|
||||
end: 0,
|
||||
body: [],
|
||||
digest: null,
|
||||
nonCodeMeta: {
|
||||
start: [],
|
||||
nonCodeNodes: [],
|
||||
digest: null,
|
||||
},
|
||||
},
|
||||
pathToNode,
|
||||
|
@ -22,17 +22,22 @@ fn basic() {
|
||||
start: 6,
|
||||
end: 7,
|
||||
name: "y".to_owned(),
|
||||
digest: None,
|
||||
},
|
||||
init: Value::Literal(Box::new(Literal {
|
||||
start: 10,
|
||||
end: 11,
|
||||
value: LiteralValue::IInteger(4),
|
||||
raw: "4".to_owned(),
|
||||
digest: None,
|
||||
})),
|
||||
digest: None,
|
||||
}],
|
||||
kind: VariableKind::Const,
|
||||
digest: None,
|
||||
})],
|
||||
non_code_meta: NonCodeMeta::default(),
|
||||
digest: None,
|
||||
};
|
||||
assert_eq!(expected, actual);
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ use parse_display::{Display, FromStr};
|
||||
use schemars::JsonSchema;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::{Map, Value as JValue};
|
||||
use sha2::{Digest as DigestTrait, Sha256};
|
||||
use tower_lsp::lsp_types::{
|
||||
CompletionItem, CompletionItemKind, DocumentSymbol, FoldingRange, FoldingRangeKind, Range as LspRange, SymbolKind,
|
||||
};
|
||||
@ -32,6 +33,9 @@ use crate::{
|
||||
mod literal_value;
|
||||
mod none;
|
||||
|
||||
/// Position-independent digest of the AST node.
|
||||
pub type Digest = [u8; 32];
|
||||
|
||||
#[derive(Debug, Default, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema, Bake)]
|
||||
#[databake(path = kcl_lib::ast::types)]
|
||||
#[ts(export)]
|
||||
@ -41,9 +45,43 @@ pub struct Program {
|
||||
pub end: usize,
|
||||
pub body: Vec<BodyItem>,
|
||||
pub non_code_meta: NonCodeMeta,
|
||||
|
||||
pub digest: Option<Digest>,
|
||||
}
|
||||
|
||||
macro_rules! compute_digest {
|
||||
(|$slf:ident, $hasher:ident| $body:block) => {
|
||||
/// Compute a digest over the AST node.
|
||||
pub fn compute_digest(&mut self) -> Digest {
|
||||
if let Some(node_digest) = self.digest {
|
||||
return node_digest;
|
||||
}
|
||||
|
||||
let mut $hasher = Sha256::new();
|
||||
|
||||
#[allow(unused_mut)]
|
||||
let mut $slf = self;
|
||||
|
||||
$hasher.update(std::any::type_name::<Self>());
|
||||
|
||||
$body
|
||||
|
||||
let node_digest: Digest = $hasher.finalize().into();
|
||||
$slf.digest = Some(node_digest);
|
||||
node_digest
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
impl Program {
|
||||
compute_digest!(|slf, hasher| {
|
||||
hasher.update(slf.body.len().to_ne_bytes());
|
||||
for body_item in slf.body.iter_mut() {
|
||||
hasher.update(body_item.compute_digest());
|
||||
}
|
||||
hasher.update(slf.non_code_meta.compute_digest());
|
||||
});
|
||||
|
||||
pub fn get_hover_value_for_position(&self, pos: usize, code: &str) -> Option<Hover> {
|
||||
// Check if we are in the non code meta.
|
||||
if let Some(meta) = self.get_non_code_meta_for_position(pos) {
|
||||
@ -481,6 +519,14 @@ pub enum BodyItem {
|
||||
}
|
||||
|
||||
impl BodyItem {
|
||||
pub fn compute_digest(&mut self) -> Digest {
|
||||
match self {
|
||||
BodyItem::ExpressionStatement(es) => es.compute_digest(),
|
||||
BodyItem::VariableDeclaration(vs) => vs.compute_digest(),
|
||||
BodyItem::ReturnStatement(rs) => rs.compute_digest(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn start(&self) -> usize {
|
||||
match self {
|
||||
BodyItem::ExpressionStatement(expression_statement) => expression_statement.start(),
|
||||
@ -531,6 +577,28 @@ pub enum Value {
|
||||
}
|
||||
|
||||
impl Value {
|
||||
pub fn compute_digest(&mut self) -> Digest {
|
||||
match self {
|
||||
Value::Literal(lit) => lit.compute_digest(),
|
||||
Value::Identifier(id) => id.compute_digest(),
|
||||
Value::TagDeclarator(tag) => tag.compute_digest(),
|
||||
Value::BinaryExpression(be) => be.compute_digest(),
|
||||
Value::FunctionExpression(fe) => fe.compute_digest(),
|
||||
Value::CallExpression(ce) => ce.compute_digest(),
|
||||
Value::PipeExpression(pe) => pe.compute_digest(),
|
||||
Value::PipeSubstitution(ps) => ps.compute_digest(),
|
||||
Value::ArrayExpression(ae) => ae.compute_digest(),
|
||||
Value::ObjectExpression(oe) => oe.compute_digest(),
|
||||
Value::MemberExpression(me) => me.compute_digest(),
|
||||
Value::UnaryExpression(ue) => ue.compute_digest(),
|
||||
Value::None(_) => {
|
||||
let mut hasher = Sha256::new();
|
||||
hasher.update(b"Value::None");
|
||||
hasher.finalize().into()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn recast(&self, options: &FormatOptions, indentation_level: usize, is_in_pipe: bool) -> String {
|
||||
match &self {
|
||||
Value::BinaryExpression(bin_exp) => bin_exp.recast(options),
|
||||
@ -759,6 +827,17 @@ impl From<&BinaryPart> for SourceRange {
|
||||
}
|
||||
|
||||
impl BinaryPart {
|
||||
pub fn compute_digest(&mut self) -> Digest {
|
||||
match self {
|
||||
BinaryPart::Literal(lit) => lit.compute_digest(),
|
||||
BinaryPart::Identifier(id) => id.compute_digest(),
|
||||
BinaryPart::BinaryExpression(be) => be.compute_digest(),
|
||||
BinaryPart::CallExpression(ce) => ce.compute_digest(),
|
||||
BinaryPart::UnaryExpression(ue) => ue.compute_digest(),
|
||||
BinaryPart::MemberExpression(me) => me.compute_digest(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Get the constraint level.
|
||||
pub fn get_constraint_level(&self) -> ConstraintLevel {
|
||||
match self {
|
||||
@ -888,6 +967,8 @@ pub struct NonCodeNode {
|
||||
pub start: usize,
|
||||
pub end: usize,
|
||||
pub value: NonCodeValue,
|
||||
|
||||
pub digest: Option<Digest>,
|
||||
}
|
||||
|
||||
impl From<NonCodeNode> for SourceRange {
|
||||
@ -903,6 +984,29 @@ impl From<&NonCodeNode> for SourceRange {
|
||||
}
|
||||
|
||||
impl NonCodeNode {
|
||||
compute_digest!(|slf, hasher| {
|
||||
match &slf.value {
|
||||
NonCodeValue::Shebang { value } => {
|
||||
hasher.update(value);
|
||||
}
|
||||
NonCodeValue::InlineComment { value, style } => {
|
||||
hasher.update(value);
|
||||
hasher.update(style.digestable_id());
|
||||
}
|
||||
NonCodeValue::BlockComment { value, style } => {
|
||||
hasher.update(value);
|
||||
hasher.update(style.digestable_id());
|
||||
}
|
||||
NonCodeValue::NewLineBlockComment { value, style } => {
|
||||
hasher.update(value);
|
||||
hasher.update(style.digestable_id());
|
||||
}
|
||||
NonCodeValue::NewLine => {
|
||||
hasher.update(b"\r\n");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
pub fn contains(&self, pos: usize) -> bool {
|
||||
self.start <= pos && pos <= self.end
|
||||
}
|
||||
@ -967,6 +1071,15 @@ pub enum CommentStyle {
|
||||
Block,
|
||||
}
|
||||
|
||||
impl CommentStyle {
|
||||
fn digestable_id(&self) -> [u8; 2] {
|
||||
match &self {
|
||||
CommentStyle::Line => *b"//",
|
||||
CommentStyle::Block => *b"/*",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema, Bake)]
|
||||
#[databake(path = kcl_lib::ast::types)]
|
||||
#[ts(export)]
|
||||
@ -1021,6 +1134,8 @@ pub enum NonCodeValue {
|
||||
pub struct NonCodeMeta {
|
||||
pub non_code_nodes: HashMap<usize, Vec<NonCodeNode>>,
|
||||
pub start: Vec<NonCodeNode>,
|
||||
|
||||
pub digest: Option<Digest>,
|
||||
}
|
||||
|
||||
// implement Deserialize manually because we to force the keys of non_code_nodes to be usize
|
||||
@ -1046,11 +1161,26 @@ impl<'de> Deserialize<'de> for NonCodeMeta {
|
||||
Ok(NonCodeMeta {
|
||||
non_code_nodes,
|
||||
start: helper.start,
|
||||
digest: None,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl NonCodeMeta {
|
||||
compute_digest!(|slf, hasher| {
|
||||
let mut keys = slf.non_code_nodes.keys().copied().collect::<Vec<_>>();
|
||||
keys.sort();
|
||||
|
||||
for key in keys.into_iter() {
|
||||
hasher.update(key.to_ne_bytes());
|
||||
let nodes = slf.non_code_nodes.get_mut(&key).unwrap();
|
||||
hasher.update(nodes.len().to_ne_bytes());
|
||||
for node in nodes.iter_mut() {
|
||||
hasher.update(node.compute_digest());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
pub fn insert(&mut self, i: usize, new: NonCodeNode) {
|
||||
self.non_code_nodes.entry(i).or_default().push(new);
|
||||
}
|
||||
@ -1074,10 +1204,18 @@ pub struct ExpressionStatement {
|
||||
pub start: usize,
|
||||
pub end: usize,
|
||||
pub expression: Value,
|
||||
|
||||
pub digest: Option<Digest>,
|
||||
}
|
||||
|
||||
impl_value_meta!(ExpressionStatement);
|
||||
|
||||
impl ExpressionStatement {
|
||||
compute_digest!(|slf, hasher| {
|
||||
hasher.update(slf.expression.compute_digest());
|
||||
});
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema, Bake)]
|
||||
#[databake(path = kcl_lib::ast::types)]
|
||||
#[ts(export)]
|
||||
@ -1088,6 +1226,8 @@ pub struct CallExpression {
|
||||
pub callee: Identifier,
|
||||
pub arguments: Vec<Value>,
|
||||
pub optional: bool,
|
||||
|
||||
pub digest: Option<Digest>,
|
||||
}
|
||||
|
||||
impl_value_meta!(CallExpression);
|
||||
@ -1106,9 +1246,19 @@ impl CallExpression {
|
||||
callee: Identifier::new(name),
|
||||
arguments,
|
||||
optional: false,
|
||||
digest: None,
|
||||
})
|
||||
}
|
||||
|
||||
compute_digest!(|slf, hasher| {
|
||||
hasher.update(slf.callee.compute_digest());
|
||||
hasher.update(slf.arguments.len().to_ne_bytes());
|
||||
for argument in slf.arguments.iter_mut() {
|
||||
hasher.update(argument.compute_digest());
|
||||
}
|
||||
hasher.update(if slf.optional { [1] } else { [0] });
|
||||
});
|
||||
|
||||
/// Is at least one argument the '%' i.e. the substitution operator?
|
||||
pub fn has_substitution_arg(&self) -> bool {
|
||||
self.arguments
|
||||
@ -1346,6 +1496,8 @@ pub struct VariableDeclaration {
|
||||
pub end: usize,
|
||||
pub declarations: Vec<VariableDeclarator>,
|
||||
pub kind: VariableKind, // Change to enum if there are specific values
|
||||
|
||||
pub digest: Option<Digest>,
|
||||
}
|
||||
|
||||
impl From<&VariableDeclaration> for Vec<CompletionItem> {
|
||||
@ -1385,15 +1537,23 @@ impl From<&VariableDeclaration> for Vec<CompletionItem> {
|
||||
impl_value_meta!(VariableDeclaration);
|
||||
|
||||
impl VariableDeclaration {
|
||||
compute_digest!(|slf, hasher| {
|
||||
hasher.update(slf.declarations.len().to_ne_bytes());
|
||||
for declarator in &mut slf.declarations {
|
||||
hasher.update(declarator.compute_digest());
|
||||
}
|
||||
hasher.update(slf.kind.digestable_id());
|
||||
});
|
||||
|
||||
pub fn new(declarations: Vec<VariableDeclarator>, kind: VariableKind) -> Self {
|
||||
Self {
|
||||
start: 0,
|
||||
end: 0,
|
||||
declarations,
|
||||
kind,
|
||||
digest: None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_lsp_folding_range(&self) -> Option<FoldingRange> {
|
||||
let recasted = self.recast(&FormatOptions::default(), 0);
|
||||
// If the recasted value only has one line, don't fold it.
|
||||
@ -1574,6 +1734,15 @@ pub enum VariableKind {
|
||||
}
|
||||
|
||||
impl VariableKind {
|
||||
fn digestable_id(&self) -> [u8; 1] {
|
||||
match self {
|
||||
VariableKind::Let => [1],
|
||||
VariableKind::Const => [2],
|
||||
VariableKind::Fn => [3],
|
||||
VariableKind::Var => [4],
|
||||
}
|
||||
}
|
||||
|
||||
pub fn to_completion_items() -> Result<Vec<CompletionItem>> {
|
||||
let mut settings = schemars::gen::SchemaSettings::openapi3();
|
||||
settings.inline_subschemas = true;
|
||||
@ -1613,6 +1782,8 @@ pub struct VariableDeclarator {
|
||||
pub id: Identifier,
|
||||
/// The value of the variable.
|
||||
pub init: Value,
|
||||
|
||||
pub digest: Option<Digest>,
|
||||
}
|
||||
|
||||
impl_value_meta!(VariableDeclarator);
|
||||
@ -1624,9 +1795,15 @@ impl VariableDeclarator {
|
||||
end: 0,
|
||||
id: Identifier::new(name),
|
||||
init,
|
||||
digest: None,
|
||||
}
|
||||
}
|
||||
|
||||
compute_digest!(|slf, hasher| {
|
||||
hasher.update(slf.id.compute_digest());
|
||||
hasher.update(slf.init.compute_digest());
|
||||
});
|
||||
|
||||
pub fn get_constraint_level(&self) -> ConstraintLevel {
|
||||
self.init.get_constraint_level()
|
||||
}
|
||||
@ -1641,6 +1818,8 @@ pub struct Literal {
|
||||
pub end: usize,
|
||||
pub value: LiteralValue,
|
||||
pub raw: String,
|
||||
|
||||
pub digest: Option<Digest>,
|
||||
}
|
||||
|
||||
impl_value_meta!(Literal);
|
||||
@ -1652,9 +1831,14 @@ impl Literal {
|
||||
end: 0,
|
||||
raw: JValue::from(value.clone()).to_string(),
|
||||
value,
|
||||
digest: None,
|
||||
}
|
||||
}
|
||||
|
||||
compute_digest!(|slf, hasher| {
|
||||
hasher.update(slf.value.digestable_id());
|
||||
});
|
||||
|
||||
/// Get the constraint level for this literal.
|
||||
/// Literals are always not constrained.
|
||||
pub fn get_constraint_level(&self) -> ConstraintLevel {
|
||||
@ -1712,6 +1896,8 @@ pub struct Identifier {
|
||||
pub start: usize,
|
||||
pub end: usize,
|
||||
pub name: String,
|
||||
|
||||
pub digest: Option<Digest>,
|
||||
}
|
||||
|
||||
impl_value_meta!(Identifier);
|
||||
@ -1722,9 +1908,16 @@ impl Identifier {
|
||||
start: 0,
|
||||
end: 0,
|
||||
name: name.to_string(),
|
||||
digest: None,
|
||||
}
|
||||
}
|
||||
|
||||
compute_digest!(|slf, hasher| {
|
||||
let name = slf.name.as_bytes();
|
||||
hasher.update(name.len().to_ne_bytes());
|
||||
hasher.update(name);
|
||||
});
|
||||
|
||||
/// Get the constraint level for this identifier.
|
||||
/// Identifier are always fully constrained.
|
||||
pub fn get_constraint_level(&self) -> ConstraintLevel {
|
||||
@ -1750,6 +1943,8 @@ pub struct TagDeclarator {
|
||||
pub end: usize,
|
||||
#[serde(rename = "value")]
|
||||
pub name: String,
|
||||
|
||||
pub digest: Option<Digest>,
|
||||
}
|
||||
|
||||
impl_value_meta!(TagDeclarator);
|
||||
@ -1820,9 +2015,16 @@ impl TagDeclarator {
|
||||
start: 0,
|
||||
end: 0,
|
||||
name: name.to_string(),
|
||||
digest: None,
|
||||
}
|
||||
}
|
||||
|
||||
compute_digest!(|slf, hasher| {
|
||||
let name = slf.name.as_bytes();
|
||||
hasher.update(name.len().to_ne_bytes());
|
||||
hasher.update(name);
|
||||
});
|
||||
|
||||
pub fn recast(&self) -> String {
|
||||
// TagDeclarators are always prefixed with a dollar sign.
|
||||
format!("${}", self.name)
|
||||
@ -1882,14 +2084,24 @@ impl TagDeclarator {
|
||||
pub struct PipeSubstitution {
|
||||
pub start: usize,
|
||||
pub end: usize,
|
||||
|
||||
pub digest: Option<Digest>,
|
||||
}
|
||||
|
||||
impl_value_meta!(PipeSubstitution);
|
||||
|
||||
impl PipeSubstitution {
|
||||
pub fn new() -> Self {
|
||||
Self { start: 0, end: 0 }
|
||||
Self {
|
||||
start: 0,
|
||||
end: 0,
|
||||
digest: None,
|
||||
}
|
||||
}
|
||||
|
||||
compute_digest!(|slf, hasher| {
|
||||
hasher.update(b"PipeSubstitution");
|
||||
});
|
||||
}
|
||||
|
||||
impl Default for PipeSubstitution {
|
||||
@ -1912,6 +2124,8 @@ pub struct ArrayExpression {
|
||||
pub start: usize,
|
||||
pub end: usize,
|
||||
pub elements: Vec<Value>,
|
||||
|
||||
pub digest: Option<Digest>,
|
||||
}
|
||||
|
||||
impl_value_meta!(ArrayExpression);
|
||||
@ -1928,9 +2142,17 @@ impl ArrayExpression {
|
||||
start: 0,
|
||||
end: 0,
|
||||
elements,
|
||||
digest: None,
|
||||
}
|
||||
}
|
||||
|
||||
compute_digest!(|slf, hasher| {
|
||||
hasher.update(slf.elements.len().to_ne_bytes());
|
||||
for value in slf.elements.iter_mut() {
|
||||
hasher.update(value.compute_digest());
|
||||
}
|
||||
});
|
||||
|
||||
pub fn replace_value(&mut self, source_range: SourceRange, new_value: Value) {
|
||||
for element in &mut self.elements {
|
||||
element.replace_value(source_range, new_value.clone());
|
||||
@ -2068,6 +2290,8 @@ pub struct ObjectExpression {
|
||||
pub start: usize,
|
||||
pub end: usize,
|
||||
pub properties: Vec<ObjectProperty>,
|
||||
|
||||
pub digest: Option<Digest>,
|
||||
}
|
||||
|
||||
impl ObjectExpression {
|
||||
@ -2076,9 +2300,17 @@ impl ObjectExpression {
|
||||
start: 0,
|
||||
end: 0,
|
||||
properties,
|
||||
digest: None,
|
||||
}
|
||||
}
|
||||
|
||||
compute_digest!(|slf, hasher| {
|
||||
hasher.update(slf.properties.len().to_ne_bytes());
|
||||
for prop in slf.properties.iter_mut() {
|
||||
hasher.update(prop.compute_digest());
|
||||
}
|
||||
});
|
||||
|
||||
pub fn replace_value(&mut self, source_range: SourceRange, new_value: Value) {
|
||||
for property in &mut self.properties {
|
||||
property.value.replace_value(source_range, new_value.clone());
|
||||
@ -2229,11 +2461,18 @@ pub struct ObjectProperty {
|
||||
pub end: usize,
|
||||
pub key: Identifier,
|
||||
pub value: Value,
|
||||
|
||||
pub digest: Option<Digest>,
|
||||
}
|
||||
|
||||
impl_value_meta!(ObjectProperty);
|
||||
|
||||
impl ObjectProperty {
|
||||
compute_digest!(|slf, hasher| {
|
||||
hasher.update(slf.key.compute_digest());
|
||||
hasher.update(slf.value.compute_digest());
|
||||
});
|
||||
|
||||
pub fn get_lsp_symbols(&self, code: &str) -> Vec<DocumentSymbol> {
|
||||
let source_range: SourceRange = self.clone().into();
|
||||
let inner_source_range: SourceRange = self.key.clone().into();
|
||||
@ -2273,6 +2512,13 @@ pub enum MemberObject {
|
||||
}
|
||||
|
||||
impl MemberObject {
|
||||
pub fn compute_digest(&mut self) -> Digest {
|
||||
match self {
|
||||
MemberObject::MemberExpression(me) => me.compute_digest(),
|
||||
MemberObject::Identifier(id) => id.compute_digest(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns a hover value that includes the given character position.
|
||||
pub fn get_hover_value_for_position(&self, pos: usize, code: &str) -> Option<Hover> {
|
||||
match self {
|
||||
@ -2320,6 +2566,13 @@ pub enum LiteralIdentifier {
|
||||
}
|
||||
|
||||
impl LiteralIdentifier {
|
||||
pub fn compute_digest(&mut self) -> Digest {
|
||||
match self {
|
||||
LiteralIdentifier::Identifier(id) => id.compute_digest(),
|
||||
LiteralIdentifier::Literal(lit) => lit.compute_digest(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn start(&self) -> usize {
|
||||
match self {
|
||||
LiteralIdentifier::Identifier(identifier) => identifier.start,
|
||||
@ -2357,11 +2610,19 @@ pub struct MemberExpression {
|
||||
pub object: MemberObject,
|
||||
pub property: LiteralIdentifier,
|
||||
pub computed: bool,
|
||||
|
||||
pub digest: Option<Digest>,
|
||||
}
|
||||
|
||||
impl_value_meta!(MemberExpression);
|
||||
|
||||
impl MemberExpression {
|
||||
compute_digest!(|slf, hasher| {
|
||||
hasher.update(slf.object.compute_digest());
|
||||
hasher.update(slf.property.compute_digest());
|
||||
hasher.update(if slf.computed { [1] } else { [0] });
|
||||
});
|
||||
|
||||
/// Get the constraint level for a member expression.
|
||||
/// This is always fully constrained.
|
||||
pub fn get_constraint_level(&self) -> ConstraintLevel {
|
||||
@ -2522,6 +2783,8 @@ pub struct BinaryExpression {
|
||||
pub operator: BinaryOperator,
|
||||
pub left: BinaryPart,
|
||||
pub right: BinaryPart,
|
||||
|
||||
pub digest: Option<Digest>,
|
||||
}
|
||||
|
||||
impl_value_meta!(BinaryExpression);
|
||||
@ -2534,9 +2797,16 @@ impl BinaryExpression {
|
||||
operator,
|
||||
left,
|
||||
right,
|
||||
digest: None,
|
||||
}
|
||||
}
|
||||
|
||||
compute_digest!(|slf, hasher| {
|
||||
hasher.update(slf.operator.digestable_id());
|
||||
hasher.update(slf.left.compute_digest());
|
||||
hasher.update(slf.right.compute_digest());
|
||||
});
|
||||
|
||||
pub fn replace_value(&mut self, source_range: SourceRange, new_value: Value) {
|
||||
self.left.replace_value(source_range, new_value.clone());
|
||||
self.right.replace_value(source_range, new_value);
|
||||
@ -2730,6 +3000,17 @@ impl Associativity {
|
||||
}
|
||||
|
||||
impl BinaryOperator {
|
||||
pub fn digestable_id(&self) -> [u8; 3] {
|
||||
match self {
|
||||
BinaryOperator::Add => *b"add",
|
||||
BinaryOperator::Sub => *b"sub",
|
||||
BinaryOperator::Mul => *b"mul",
|
||||
BinaryOperator::Div => *b"div",
|
||||
BinaryOperator::Mod => *b"mod",
|
||||
BinaryOperator::Pow => *b"pow",
|
||||
}
|
||||
}
|
||||
|
||||
/// Follow JS definitions of each operator.
|
||||
/// Taken from <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_precedence#table>
|
||||
pub fn precedence(&self) -> u8 {
|
||||
@ -2758,6 +3039,8 @@ pub struct UnaryExpression {
|
||||
pub end: usize,
|
||||
pub operator: UnaryOperator,
|
||||
pub argument: BinaryPart,
|
||||
|
||||
pub digest: Option<Digest>,
|
||||
}
|
||||
|
||||
impl_value_meta!(UnaryExpression);
|
||||
@ -2769,9 +3052,15 @@ impl UnaryExpression {
|
||||
end: argument.end(),
|
||||
operator,
|
||||
argument,
|
||||
digest: None,
|
||||
}
|
||||
}
|
||||
|
||||
compute_digest!(|slf, hasher| {
|
||||
hasher.update(slf.operator.digestable_id());
|
||||
hasher.update(slf.argument.compute_digest());
|
||||
});
|
||||
|
||||
pub fn replace_value(&mut self, source_range: SourceRange, new_value: Value) {
|
||||
self.argument.replace_value(source_range, new_value);
|
||||
}
|
||||
@ -2848,6 +3137,15 @@ pub enum UnaryOperator {
|
||||
Not,
|
||||
}
|
||||
|
||||
impl UnaryOperator {
|
||||
pub fn digestable_id(&self) -> [u8; 3] {
|
||||
match self {
|
||||
UnaryOperator::Neg => *b"neg",
|
||||
UnaryOperator::Not => *b"not",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema, Bake)]
|
||||
#[databake(path = kcl_lib::ast::types)]
|
||||
#[ts(export)]
|
||||
@ -2859,6 +3157,8 @@ pub struct PipeExpression {
|
||||
// The rest will be CallExpression, and the AST type should reflect this.
|
||||
pub body: Vec<Value>,
|
||||
pub non_code_meta: NonCodeMeta,
|
||||
|
||||
pub digest: Option<Digest>,
|
||||
}
|
||||
|
||||
impl_value_meta!(PipeExpression);
|
||||
@ -2876,9 +3176,18 @@ impl PipeExpression {
|
||||
end: 0,
|
||||
body,
|
||||
non_code_meta: Default::default(),
|
||||
digest: None,
|
||||
}
|
||||
}
|
||||
|
||||
compute_digest!(|slf, hasher| {
|
||||
hasher.update(slf.body.len().to_ne_bytes());
|
||||
for value in slf.body.iter_mut() {
|
||||
hasher.update(value.compute_digest());
|
||||
}
|
||||
hasher.update(slf.non_code_meta.compute_digest());
|
||||
});
|
||||
|
||||
pub fn replace_value(&mut self, source_range: SourceRange, new_value: Value) {
|
||||
for value in &mut self.body {
|
||||
value.replace_value(source_range, new_value.clone());
|
||||
@ -3044,6 +3353,20 @@ pub enum FnArgPrimitive {
|
||||
ExtrudeGroup,
|
||||
}
|
||||
|
||||
impl FnArgPrimitive {
|
||||
pub fn digestable_id(&self) -> &[u8] {
|
||||
match self {
|
||||
FnArgPrimitive::String => b"string",
|
||||
FnArgPrimitive::Number => b"number",
|
||||
FnArgPrimitive::Boolean => b"boolean",
|
||||
FnArgPrimitive::Tag => b"tag",
|
||||
FnArgPrimitive::SketchGroup => b"sketchgroup",
|
||||
FnArgPrimitive::SketchSurface => b"sketchsurface",
|
||||
FnArgPrimitive::ExtrudeGroup => b"extrudegroup",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, Eq, JsonSchema, Bake)]
|
||||
#[databake(path = kcl_lib::ast::types)]
|
||||
#[serde(tag = "type")]
|
||||
@ -3058,6 +3381,32 @@ pub enum FnArgType {
|
||||
},
|
||||
}
|
||||
|
||||
impl FnArgType {
|
||||
pub fn compute_digest(&mut self) -> Digest {
|
||||
let mut hasher = Sha256::new();
|
||||
|
||||
match self {
|
||||
FnArgType::Primitive(prim) => {
|
||||
hasher.update(b"FnArgType::Primitive");
|
||||
hasher.update(prim.digestable_id())
|
||||
}
|
||||
FnArgType::Array(prim) => {
|
||||
hasher.update(b"FnArgType::Array");
|
||||
hasher.update(prim.digestable_id())
|
||||
}
|
||||
FnArgType::Object { properties } => {
|
||||
hasher.update(b"FnArgType::Object");
|
||||
hasher.update(properties.len().to_ne_bytes());
|
||||
for prop in properties.iter_mut() {
|
||||
hasher.update(prop.compute_digest());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
hasher.finalize().into()
|
||||
}
|
||||
}
|
||||
|
||||
/// Parameter of a KCL function.
|
||||
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, Eq, ts_rs::TS, JsonSchema, Bake)]
|
||||
#[databake(path = kcl_lib::ast::types)]
|
||||
@ -3072,6 +3421,24 @@ pub struct Parameter {
|
||||
pub type_: Option<FnArgType>,
|
||||
/// Is the parameter optional?
|
||||
pub optional: bool,
|
||||
|
||||
pub digest: Option<Digest>,
|
||||
}
|
||||
|
||||
impl Parameter {
|
||||
compute_digest!(|slf, hasher| {
|
||||
hasher.update(slf.identifier.compute_digest());
|
||||
match &mut slf.type_ {
|
||||
Some(arg) => {
|
||||
hasher.update(b"Parameter::type_::Some");
|
||||
hasher.update(arg.compute_digest())
|
||||
}
|
||||
None => {
|
||||
hasher.update(b"Parameter::type_::None");
|
||||
}
|
||||
}
|
||||
hasher.update(if slf.optional { [1] } else { [0] })
|
||||
});
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema, Bake)]
|
||||
@ -3085,6 +3452,8 @@ pub struct FunctionExpression {
|
||||
pub body: Program,
|
||||
#[serde(skip)]
|
||||
pub return_type: Option<FnArgType>,
|
||||
|
||||
pub digest: Option<Digest>,
|
||||
}
|
||||
|
||||
impl_value_meta!(FunctionExpression);
|
||||
@ -3114,12 +3483,30 @@ impl FunctionExpression {
|
||||
}
|
||||
}
|
||||
|
||||
compute_digest!(|slf, hasher| {
|
||||
hasher.update(slf.params.len().to_ne_bytes());
|
||||
for param in slf.params.iter_mut() {
|
||||
hasher.update(param.compute_digest());
|
||||
}
|
||||
hasher.update(slf.body.compute_digest());
|
||||
match &mut slf.return_type {
|
||||
Some(rt) => {
|
||||
hasher.update(b"FunctionExpression::return_type::Some");
|
||||
hasher.update(rt.compute_digest());
|
||||
}
|
||||
None => {
|
||||
hasher.update(b"FunctionExpression::return_type::None");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
pub fn into_parts(self) -> Result<FunctionExpressionParts, RequiredParamAfterOptionalParam> {
|
||||
let Self {
|
||||
start,
|
||||
end,
|
||||
params,
|
||||
body,
|
||||
digest: _,
|
||||
return_type: _,
|
||||
} = self;
|
||||
let mut params_required = Vec::with_capacity(params.len());
|
||||
@ -3200,10 +3587,18 @@ pub struct ReturnStatement {
|
||||
pub start: usize,
|
||||
pub end: usize,
|
||||
pub argument: Value,
|
||||
|
||||
pub digest: Option<Digest>,
|
||||
}
|
||||
|
||||
impl_value_meta!(ReturnStatement);
|
||||
|
||||
impl ReturnStatement {
|
||||
compute_digest!(|slf, hasher| {
|
||||
hasher.update(slf.argument.compute_digest());
|
||||
});
|
||||
}
|
||||
|
||||
/// Describes information about a hover.
|
||||
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
@ -4933,28 +5328,34 @@ const firstExtrude = startSketchOn('XY')
|
||||
identifier: Identifier {
|
||||
start: 35,
|
||||
end: 40,
|
||||
name: "thing".to_owned()
|
||||
name: "thing".to_owned(),
|
||||
digest: None,
|
||||
},
|
||||
type_: Some(FnArgType::Primitive(FnArgPrimitive::Number)),
|
||||
optional: false
|
||||
optional: false,
|
||||
digest: None
|
||||
},
|
||||
Parameter {
|
||||
identifier: Identifier {
|
||||
start: 50,
|
||||
end: 56,
|
||||
name: "things".to_owned()
|
||||
name: "things".to_owned(),
|
||||
digest: None,
|
||||
},
|
||||
type_: Some(FnArgType::Array(FnArgPrimitive::String)),
|
||||
optional: false
|
||||
optional: false,
|
||||
digest: None
|
||||
},
|
||||
Parameter {
|
||||
identifier: Identifier {
|
||||
start: 68,
|
||||
end: 72,
|
||||
name: "more".to_owned()
|
||||
name: "more".to_owned(),
|
||||
digest: None
|
||||
},
|
||||
type_: Some(FnArgType::Primitive(FnArgPrimitive::String)),
|
||||
optional: true
|
||||
optional: true,
|
||||
digest: None
|
||||
}
|
||||
]
|
||||
})
|
||||
@ -4989,28 +5390,34 @@ const firstExtrude = startSketchOn('XY')
|
||||
identifier: Identifier {
|
||||
start: 18,
|
||||
end: 23,
|
||||
name: "thing".to_owned()
|
||||
name: "thing".to_owned(),
|
||||
digest: None
|
||||
},
|
||||
type_: Some(FnArgType::Primitive(FnArgPrimitive::Number)),
|
||||
optional: false
|
||||
optional: false,
|
||||
digest: None
|
||||
},
|
||||
Parameter {
|
||||
identifier: Identifier {
|
||||
start: 33,
|
||||
end: 39,
|
||||
name: "things".to_owned()
|
||||
name: "things".to_owned(),
|
||||
digest: None
|
||||
},
|
||||
type_: Some(FnArgType::Array(FnArgPrimitive::String)),
|
||||
optional: false
|
||||
optional: false,
|
||||
digest: None
|
||||
},
|
||||
Parameter {
|
||||
identifier: Identifier {
|
||||
start: 51,
|
||||
end: 55,
|
||||
name: "more".to_owned()
|
||||
name: "more".to_owned(),
|
||||
digest: None
|
||||
},
|
||||
type_: Some(FnArgType::Primitive(FnArgPrimitive::String)),
|
||||
optional: true
|
||||
optional: true,
|
||||
digest: None
|
||||
}
|
||||
]
|
||||
})
|
||||
@ -5103,8 +5510,10 @@ const thickness = sqrt(distance * p * FOS * 6 / (sigmaAllow * width))"#;
|
||||
end: 0,
|
||||
body: Vec::new(),
|
||||
non_code_meta: Default::default(),
|
||||
digest: None,
|
||||
},
|
||||
return_type: None,
|
||||
digest: None,
|
||||
},
|
||||
),
|
||||
(
|
||||
@ -5118,17 +5527,21 @@ const thickness = sqrt(distance * p * FOS * 6 / (sigmaAllow * width))"#;
|
||||
start: 0,
|
||||
end: 0,
|
||||
name: "foo".to_owned(),
|
||||
digest: None,
|
||||
},
|
||||
type_: None,
|
||||
optional: false,
|
||||
digest: None,
|
||||
}],
|
||||
body: Program {
|
||||
start: 0,
|
||||
end: 0,
|
||||
body: Vec::new(),
|
||||
non_code_meta: Default::default(),
|
||||
digest: None,
|
||||
},
|
||||
return_type: None,
|
||||
digest: None,
|
||||
},
|
||||
),
|
||||
(
|
||||
@ -5142,17 +5555,21 @@ const thickness = sqrt(distance * p * FOS * 6 / (sigmaAllow * width))"#;
|
||||
start: 0,
|
||||
end: 0,
|
||||
name: "foo".to_owned(),
|
||||
digest: None,
|
||||
},
|
||||
type_: None,
|
||||
optional: true,
|
||||
digest: None,
|
||||
}],
|
||||
body: Program {
|
||||
start: 0,
|
||||
end: 0,
|
||||
body: Vec::new(),
|
||||
non_code_meta: Default::default(),
|
||||
digest: None,
|
||||
},
|
||||
return_type: None,
|
||||
digest: None,
|
||||
},
|
||||
),
|
||||
(
|
||||
@ -5167,18 +5584,22 @@ const thickness = sqrt(distance * p * FOS * 6 / (sigmaAllow * width))"#;
|
||||
start: 0,
|
||||
end: 0,
|
||||
name: "foo".to_owned(),
|
||||
digest: None,
|
||||
},
|
||||
type_: None,
|
||||
optional: false,
|
||||
digest: None,
|
||||
},
|
||||
Parameter {
|
||||
identifier: Identifier {
|
||||
start: 0,
|
||||
end: 0,
|
||||
name: "bar".to_owned(),
|
||||
digest: None,
|
||||
},
|
||||
type_: None,
|
||||
optional: true,
|
||||
digest: None,
|
||||
},
|
||||
],
|
||||
body: Program {
|
||||
@ -5186,8 +5607,10 @@ const thickness = sqrt(distance * p * FOS * 6 / (sigmaAllow * width))"#;
|
||||
end: 0,
|
||||
body: Vec::new(),
|
||||
non_code_meta: Default::default(),
|
||||
digest: None,
|
||||
},
|
||||
return_type: None,
|
||||
digest: None,
|
||||
},
|
||||
),
|
||||
]
|
||||
@ -5212,6 +5635,7 @@ const thickness = sqrt(distance * p * FOS * 6 / (sigmaAllow * width))"#;
|
||||
expression,
|
||||
start: _,
|
||||
end: _,
|
||||
digest: None,
|
||||
}) = program.body.first().unwrap()
|
||||
else {
|
||||
panic!("expected a function!");
|
||||
@ -5275,4 +5699,35 @@ const thickness = sqrt(distance * p * FOS * 6 / (sigmaAllow * width))"#;
|
||||
r#"syntax: KclErrorDetails { source_ranges: [SourceRange([57, 59])], message: "Unexpected token" }"#
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn test_parse_digest() {
|
||||
let prog1_string = r#"startSketchOn('XY')
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> line([5, 5], %)
|
||||
"#;
|
||||
let prog1_tokens = crate::token::lexer(prog1_string).unwrap();
|
||||
let prog1_parser = crate::parser::Parser::new(prog1_tokens);
|
||||
let prog1_digest = prog1_parser.ast().unwrap().compute_digest();
|
||||
|
||||
let prog2_string = r#"startSketchOn('XY')
|
||||
|> startProfileAt([0, 2], %)
|
||||
|> line([5, 5], %)
|
||||
"#;
|
||||
let prog2_tokens = crate::token::lexer(prog2_string).unwrap();
|
||||
let prog2_parser = crate::parser::Parser::new(prog2_tokens);
|
||||
let prog2_digest = prog2_parser.ast().unwrap().compute_digest();
|
||||
|
||||
assert!(prog1_digest != prog2_digest);
|
||||
|
||||
let prog3_string = r#"startSketchOn('XY')
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> line([5, 5], %)
|
||||
"#;
|
||||
let prog3_tokens = crate::token::lexer(prog3_string).unwrap();
|
||||
let prog3_parser = crate::parser::Parser::new(prog3_tokens);
|
||||
let prog3_digest = prog3_parser.ast().unwrap().compute_digest();
|
||||
|
||||
assert_eq!(prog1_digest, prog3_digest);
|
||||
}
|
||||
}
|
||||
|
@ -16,6 +16,23 @@ pub enum LiteralValue {
|
||||
Bool(bool),
|
||||
}
|
||||
|
||||
impl LiteralValue {
|
||||
pub fn digestable_id(&self) -> Vec<u8> {
|
||||
match self {
|
||||
LiteralValue::IInteger(i) => i.to_ne_bytes().into(),
|
||||
LiteralValue::Fractional(frac) => frac.to_ne_bytes().into(),
|
||||
LiteralValue::String(st) => st.as_bytes().into(),
|
||||
LiteralValue::Bool(b) => {
|
||||
if *b {
|
||||
vec![1]
|
||||
} else {
|
||||
vec![0]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Literal> for Value {
|
||||
fn from(literal: Literal) -> Self {
|
||||
Value::Literal(Box::new(literal))
|
||||
|
@ -344,6 +344,7 @@ pub fn get_type_string_from_schema(schema: &schemars::schema::Schema) -> Result<
|
||||
} else if format == "double"
|
||||
|| format == "uint"
|
||||
|| format == "int64"
|
||||
|| format == "uint8"
|
||||
|| format == "uint32"
|
||||
|| format == "uint64"
|
||||
{
|
||||
|
@ -710,6 +710,7 @@ impl MemoryItem {
|
||||
name,
|
||||
start: u.meta[0].source_range.start(),
|
||||
end: u.meta[0].source_range.end(),
|
||||
digest: None,
|
||||
})
|
||||
}
|
||||
_ => Err(KclError::Semantic(KclErrorDetails {
|
||||
@ -729,6 +730,7 @@ impl MemoryItem {
|
||||
name,
|
||||
start: u.meta[0].source_range.start(),
|
||||
end: u.meta[0].source_range.end(),
|
||||
digest: None,
|
||||
}))
|
||||
} else {
|
||||
Ok(None)
|
||||
@ -961,7 +963,7 @@ pub enum FilletOrChamfer {
|
||||
length: f64,
|
||||
/// The engine id of the edge to chamfer.
|
||||
edge_id: uuid::Uuid,
|
||||
tag: Option<TagDeclarator>,
|
||||
tag: Box<Option<TagDeclarator>>,
|
||||
},
|
||||
}
|
||||
|
||||
@ -983,7 +985,7 @@ impl FilletOrChamfer {
|
||||
pub fn tag(&self) -> Option<TagDeclarator> {
|
||||
match self {
|
||||
FilletOrChamfer::Fillet { .. } => None,
|
||||
FilletOrChamfer::Chamfer { tag, .. } => tag.clone(),
|
||||
FilletOrChamfer::Chamfer { tag, .. } => *tag.clone(),
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2379,6 +2381,7 @@ const bracket = startSketchOn('XY')
|
||||
start: 0,
|
||||
end: 0,
|
||||
name: s.to_owned(),
|
||||
digest: None,
|
||||
}
|
||||
}
|
||||
fn opt_param(s: &'static str) -> Parameter {
|
||||
@ -2386,6 +2389,7 @@ const bracket = startSketchOn('XY')
|
||||
identifier: ident(s),
|
||||
type_: None,
|
||||
optional: true,
|
||||
digest: None,
|
||||
}
|
||||
}
|
||||
fn req_param(s: &'static str) -> Parameter {
|
||||
@ -2393,6 +2397,7 @@ const bracket = startSketchOn('XY')
|
||||
identifier: ident(s),
|
||||
type_: None,
|
||||
optional: false,
|
||||
digest: None,
|
||||
}
|
||||
}
|
||||
fn additional_program_memory(items: &[(String, MemoryItem)]) -> ProgramMemory {
|
||||
@ -2476,8 +2481,10 @@ const bracket = startSketchOn('XY')
|
||||
end: 0,
|
||||
body: Vec::new(),
|
||||
non_code_meta: Default::default(),
|
||||
digest: None,
|
||||
},
|
||||
return_type: None,
|
||||
digest: None,
|
||||
};
|
||||
let actual = assign_args_to_params(func_expr, args, ProgramMemory::new());
|
||||
assert_eq!(
|
||||
|
@ -34,6 +34,7 @@ fn evaluate(rpn: Vec<BinaryExpressionToken>) -> Result<BinaryExpression, KclErro
|
||||
operator,
|
||||
left,
|
||||
right,
|
||||
digest: None,
|
||||
}))
|
||||
}
|
||||
BinaryExpressionToken::Operand(o) => o,
|
||||
@ -129,6 +130,7 @@ mod tests {
|
||||
end: 0,
|
||||
value: n.into(),
|
||||
raw: n.to_string(),
|
||||
digest: None,
|
||||
}))
|
||||
}
|
||||
let tests: Vec<Vec<BinaryExpressionToken>> = vec![
|
||||
@ -146,6 +148,7 @@ mod tests {
|
||||
operator: BinaryOperator::Sub,
|
||||
left: lit(1),
|
||||
right: lit(5),
|
||||
digest: None,
|
||||
}))
|
||||
.into(),
|
||||
BinaryOperator::Pow.into(),
|
||||
|
@ -87,6 +87,7 @@ fn non_code_node(i: TokenSlice) -> PResult<NonCodeNode> {
|
||||
} else {
|
||||
NonCodeValue::BlockComment { value, style }
|
||||
},
|
||||
digest: None,
|
||||
}),
|
||||
_ => None,
|
||||
})
|
||||
@ -124,6 +125,7 @@ fn non_code_node_no_leading_whitespace(i: TokenSlice) -> PResult<NonCodeNode> {
|
||||
start: token.start,
|
||||
end: token.end,
|
||||
value,
|
||||
digest: None,
|
||||
})
|
||||
}
|
||||
})
|
||||
@ -193,6 +195,7 @@ fn pipe_expression(i: TokenSlice) -> PResult<PipeExpression> {
|
||||
end: values.last().unwrap().end().max(max_noncode_end),
|
||||
body: values,
|
||||
non_code_meta,
|
||||
digest: None,
|
||||
})
|
||||
}
|
||||
|
||||
@ -213,6 +216,7 @@ fn bool_value(i: TokenSlice) -> PResult<Literal> {
|
||||
end: token.end,
|
||||
value: LiteralValue::Bool(value),
|
||||
raw: value.to_string(),
|
||||
digest: None,
|
||||
})
|
||||
}
|
||||
|
||||
@ -242,6 +246,7 @@ pub fn string_literal(i: TokenSlice) -> PResult<Literal> {
|
||||
end: token.end,
|
||||
value,
|
||||
raw: token.value.clone(),
|
||||
digest: None,
|
||||
})
|
||||
}
|
||||
|
||||
@ -274,6 +279,7 @@ pub(crate) fn unsigned_number_literal(i: TokenSlice) -> PResult<Literal> {
|
||||
end: token.end,
|
||||
value,
|
||||
raw: token.value.clone(),
|
||||
digest: None,
|
||||
})
|
||||
}
|
||||
|
||||
@ -431,6 +437,7 @@ fn shebang(i: TokenSlice) -> PResult<NonCodeNode> {
|
||||
value: NonCodeValue::Shebang {
|
||||
value: format!("#!{}", value),
|
||||
},
|
||||
digest: None,
|
||||
})
|
||||
}
|
||||
|
||||
@ -452,7 +459,12 @@ fn array(i: TokenSlice) -> PResult<ArrayExpression> {
|
||||
.parse_next(i)?;
|
||||
ignore_whitespace(i);
|
||||
let end = close_bracket(i)?.end;
|
||||
Ok(ArrayExpression { start, end, elements })
|
||||
Ok(ArrayExpression {
|
||||
start,
|
||||
end,
|
||||
elements,
|
||||
digest: None,
|
||||
})
|
||||
}
|
||||
|
||||
/// Parse n..m into a vec of numbers [n, n+1, ..., m]
|
||||
@ -468,6 +480,7 @@ fn integer_range(i: TokenSlice) -> PResult<Vec<Value>> {
|
||||
end: token0.end,
|
||||
value: num.into(),
|
||||
raw: num.to_string(),
|
||||
digest: None,
|
||||
}))
|
||||
})
|
||||
.collect())
|
||||
@ -491,6 +504,7 @@ fn object_property(i: TokenSlice) -> PResult<ObjectProperty> {
|
||||
end: val.end(),
|
||||
key,
|
||||
value: val,
|
||||
digest: None,
|
||||
})
|
||||
}
|
||||
|
||||
@ -506,7 +520,12 @@ fn object(i: TokenSlice) -> PResult<ObjectExpression> {
|
||||
ignore_trailing_comma(i);
|
||||
ignore_whitespace(i);
|
||||
let end = close_brace(i)?.end;
|
||||
Ok(ObjectExpression { start, end, properties })
|
||||
Ok(ObjectExpression {
|
||||
start,
|
||||
end,
|
||||
properties,
|
||||
digest: None,
|
||||
})
|
||||
}
|
||||
|
||||
/// Parse the % symbol, used to substitute a curried argument from a |> (pipe).
|
||||
@ -516,6 +535,7 @@ fn pipe_sub(i: TokenSlice) -> PResult<PipeSubstitution> {
|
||||
Ok(PipeSubstitution {
|
||||
start: token.start,
|
||||
end: token.end,
|
||||
digest: None,
|
||||
})
|
||||
} else {
|
||||
Err(KclError::Syntax(KclErrorDetails {
|
||||
@ -555,6 +575,7 @@ fn function_expression(i: TokenSlice) -> PResult<FunctionExpression> {
|
||||
params,
|
||||
body,
|
||||
return_type,
|
||||
digest: None,
|
||||
})
|
||||
}
|
||||
|
||||
@ -602,6 +623,7 @@ fn member_expression(i: TokenSlice) -> PResult<MemberExpression> {
|
||||
object: MemberObject::Identifier(Box::new(id)),
|
||||
computed,
|
||||
property,
|
||||
digest: None,
|
||||
};
|
||||
|
||||
// Each remaining member wraps the current member expression inside another member expression.
|
||||
@ -616,6 +638,7 @@ fn member_expression(i: TokenSlice) -> PResult<MemberExpression> {
|
||||
object: MemberObject::MemberExpression(Box::new(accumulated)),
|
||||
computed,
|
||||
property,
|
||||
digest: None,
|
||||
}
|
||||
}))
|
||||
}
|
||||
@ -681,7 +704,12 @@ fn noncode_just_after_code(i: TokenSlice) -> PResult<NonCodeNode> {
|
||||
Ok(nc)
|
||||
}
|
||||
|
||||
// the large_enum_variant lint below introduces a LOT of code complexity in a
|
||||
// match!() that's super clean that isn't worth it for the marginal space
|
||||
// savings. revisit if that's a lie.
|
||||
|
||||
#[derive(Debug)]
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
enum WithinFunction {
|
||||
BodyItem((BodyItem, Option<NonCodeNode>)),
|
||||
NonCode(NonCodeNode),
|
||||
@ -762,6 +790,7 @@ pub fn function_body(i: TokenSlice) -> PResult<Program> {
|
||||
start: ws_token.start,
|
||||
end: ws_token.end,
|
||||
value: NonCodeValue::NewLine,
|
||||
digest: None,
|
||||
}));
|
||||
}
|
||||
}
|
||||
@ -843,6 +872,7 @@ pub fn function_body(i: TokenSlice) -> PResult<Program> {
|
||||
end,
|
||||
body,
|
||||
non_code_meta,
|
||||
digest: None,
|
||||
})
|
||||
}
|
||||
|
||||
@ -869,6 +899,7 @@ pub fn return_stmt(i: TokenSlice) -> PResult<ReturnStatement> {
|
||||
start,
|
||||
end: argument.end(),
|
||||
argument,
|
||||
digest: None,
|
||||
})
|
||||
}
|
||||
|
||||
@ -1006,8 +1037,10 @@ fn declaration(i: TokenSlice) -> PResult<VariableDeclaration> {
|
||||
end,
|
||||
id,
|
||||
init: val,
|
||||
digest: None,
|
||||
}],
|
||||
kind,
|
||||
digest: None,
|
||||
})
|
||||
}
|
||||
|
||||
@ -1020,6 +1053,7 @@ impl TryFrom<Token> for Identifier {
|
||||
start: token.start,
|
||||
end: token.end,
|
||||
name: token.value,
|
||||
digest: None,
|
||||
})
|
||||
} else {
|
||||
Err(KclError::Syntax(KclErrorDetails {
|
||||
@ -1050,6 +1084,7 @@ impl TryFrom<Token> for TagDeclarator {
|
||||
start: token.start - 1,
|
||||
end: token.end,
|
||||
name: token.value,
|
||||
digest: None,
|
||||
})
|
||||
} else {
|
||||
Err(KclError::Syntax(KclErrorDetails {
|
||||
@ -1116,6 +1151,7 @@ fn unary_expression(i: TokenSlice) -> PResult<UnaryExpression> {
|
||||
end: argument.end(),
|
||||
operator,
|
||||
argument,
|
||||
digest: None,
|
||||
})
|
||||
}
|
||||
|
||||
@ -1193,6 +1229,7 @@ fn expression(i: TokenSlice) -> PResult<ExpressionStatement> {
|
||||
start: val.start(),
|
||||
end: val.end(),
|
||||
expression: val,
|
||||
digest: None,
|
||||
})
|
||||
}
|
||||
|
||||
@ -1410,6 +1447,7 @@ fn parameters(i: TokenSlice) -> PResult<Vec<Parameter>> {
|
||||
identifier,
|
||||
type_,
|
||||
optional,
|
||||
digest: None,
|
||||
})
|
||||
})
|
||||
.collect::<Result<_, _>>()
|
||||
@ -1499,6 +1537,7 @@ fn fn_call(i: TokenSlice) -> PResult<CallExpression> {
|
||||
start: literal.start,
|
||||
end: literal.end,
|
||||
name: name.to_string(),
|
||||
digest: None,
|
||||
};
|
||||
let tag = tag
|
||||
.into_valid_binding_name()
|
||||
@ -1537,6 +1576,7 @@ fn fn_call(i: TokenSlice) -> PResult<CallExpression> {
|
||||
start: literal.start,
|
||||
end: literal.end,
|
||||
name: name.to_string(),
|
||||
digest: None,
|
||||
};
|
||||
|
||||
// Replace the literal with the tag.
|
||||
@ -1565,6 +1605,7 @@ fn fn_call(i: TokenSlice) -> PResult<CallExpression> {
|
||||
callee: fn_name,
|
||||
arguments: args,
|
||||
optional: false,
|
||||
digest: None,
|
||||
})
|
||||
}
|
||||
|
||||
@ -1740,19 +1781,25 @@ const mySk1 = startSketchAt([0, 0])"#;
|
||||
start: 32,
|
||||
end: 33,
|
||||
value: 2u32.into(),
|
||||
raw: "2".to_owned()
|
||||
}))
|
||||
raw: "2".to_owned(),
|
||||
digest: None,
|
||||
})),
|
||||
digest: None,
|
||||
})],
|
||||
non_code_meta: NonCodeMeta {
|
||||
non_code_nodes: Default::default(),
|
||||
start: vec![NonCodeNode {
|
||||
start: 7,
|
||||
end: 25,
|
||||
value: NonCodeValue::NewLine
|
||||
}]
|
||||
value: NonCodeValue::NewLine,
|
||||
digest: None
|
||||
}],
|
||||
digest: None,
|
||||
},
|
||||
digest: None,
|
||||
},
|
||||
return_type: None,
|
||||
digest: None,
|
||||
}
|
||||
);
|
||||
}
|
||||
@ -1800,7 +1847,8 @@ const mySk1 = startSketchAt([0, 0])"#;
|
||||
value: NonCodeValue::BlockComment {
|
||||
value: "this is a comment".to_owned(),
|
||||
style: CommentStyle::Line
|
||||
}
|
||||
},
|
||||
digest: None,
|
||||
}],
|
||||
non_code_meta.start,
|
||||
);
|
||||
@ -1812,12 +1860,14 @@ const mySk1 = startSketchAt([0, 0])"#;
|
||||
value: NonCodeValue::InlineComment {
|
||||
value: "block\n comment".to_owned(),
|
||||
style: CommentStyle::Block
|
||||
}
|
||||
},
|
||||
digest: None,
|
||||
},
|
||||
NonCodeNode {
|
||||
start: 82,
|
||||
end: 86,
|
||||
value: NonCodeValue::NewLine
|
||||
value: NonCodeValue::NewLine,
|
||||
digest: None,
|
||||
},
|
||||
]),
|
||||
non_code_meta.non_code_nodes.get(&0),
|
||||
@ -1829,7 +1879,8 @@ const mySk1 = startSketchAt([0, 0])"#;
|
||||
value: NonCodeValue::BlockComment {
|
||||
value: "this is also a comment".to_owned(),
|
||||
style: CommentStyle::Line
|
||||
}
|
||||
},
|
||||
digest: None,
|
||||
}]),
|
||||
non_code_meta.non_code_nodes.get(&1),
|
||||
);
|
||||
@ -1896,7 +1947,8 @@ const mySk1 = startSketchAt([0, 0])"#;
|
||||
start: 9,
|
||||
end: 10,
|
||||
value: 3u32.into(),
|
||||
raw: "3".to_owned()
|
||||
raw: "3".to_owned(),
|
||||
digest: None,
|
||||
}))
|
||||
);
|
||||
}
|
||||
@ -2030,6 +2082,7 @@ const mySk1 = startSketchAt([0, 0])"#;
|
||||
value: "hi".to_owned(),
|
||||
style: CommentStyle::Line,
|
||||
},
|
||||
digest: None,
|
||||
},
|
||||
),
|
||||
(
|
||||
@ -2041,6 +2094,7 @@ const mySk1 = startSketchAt([0, 0])"#;
|
||||
value: "hello".to_owned(),
|
||||
style: CommentStyle::Block,
|
||||
},
|
||||
digest: None,
|
||||
},
|
||||
),
|
||||
(
|
||||
@ -2052,6 +2106,7 @@ const mySk1 = startSketchAt([0, 0])"#;
|
||||
value: "hello".to_owned(),
|
||||
style: CommentStyle::Block,
|
||||
},
|
||||
digest: None,
|
||||
},
|
||||
),
|
||||
(
|
||||
@ -2063,6 +2118,7 @@ const mySk1 = startSketchAt([0, 0])"#;
|
||||
value: "hello".to_owned(),
|
||||
style: CommentStyle::Block,
|
||||
},
|
||||
digest: None,
|
||||
},
|
||||
),
|
||||
(
|
||||
@ -2075,6 +2131,7 @@ const mySk1 = startSketchAt([0, 0])"#;
|
||||
value: "hello".to_owned(),
|
||||
style: CommentStyle::Block,
|
||||
},
|
||||
digest: None,
|
||||
},
|
||||
),
|
||||
(
|
||||
@ -2089,6 +2146,7 @@ const mySk1 = startSketchAt([0, 0])"#;
|
||||
value: "hello".to_owned(),
|
||||
style: CommentStyle::Block,
|
||||
},
|
||||
digest: None,
|
||||
},
|
||||
),
|
||||
(
|
||||
@ -2103,6 +2161,7 @@ const mySk1 = startSketchAt([0, 0])"#;
|
||||
value: "hello".to_owned(),
|
||||
style: CommentStyle::Block,
|
||||
},
|
||||
digest: None,
|
||||
},
|
||||
),
|
||||
(
|
||||
@ -2115,6 +2174,7 @@ const mySk1 = startSketchAt([0, 0])"#;
|
||||
value: "block\n comment".to_owned(),
|
||||
style: CommentStyle::Block,
|
||||
},
|
||||
digest: None,
|
||||
},
|
||||
),
|
||||
]
|
||||
@ -2258,18 +2318,22 @@ const mySk1 = startSketchAt([0, 0])"#;
|
||||
end: 1,
|
||||
value: 5u32.into(),
|
||||
raw: "5".to_owned(),
|
||||
digest: None,
|
||||
})),
|
||||
right: BinaryPart::Literal(Box::new(Literal {
|
||||
start: 4,
|
||||
end: 7,
|
||||
value: "a".into(),
|
||||
raw: r#""a""#.to_owned(),
|
||||
digest: None,
|
||||
})),
|
||||
digest: None,
|
||||
};
|
||||
let expected = vec![BodyItem::ExpressionStatement(ExpressionStatement {
|
||||
start: 0,
|
||||
end: 7,
|
||||
expression: Value::BinaryExpression(Box::new(expr)),
|
||||
digest: None,
|
||||
})];
|
||||
assert_eq!(expected, actual);
|
||||
}
|
||||
@ -2371,6 +2435,7 @@ const mySk1 = startSketchAt([0, 0])"#;
|
||||
end: 1,
|
||||
value: 5u32.into(),
|
||||
raw: "5".to_string(),
|
||||
digest: None,
|
||||
})),
|
||||
operator: BinaryOperator::Add,
|
||||
right: BinaryPart::Literal(Box::new(Literal {
|
||||
@ -2378,10 +2443,14 @@ const mySk1 = startSketchAt([0, 0])"#;
|
||||
end: 4,
|
||||
value: 6u32.into(),
|
||||
raw: "6".to_string(),
|
||||
digest: None,
|
||||
})),
|
||||
digest: None,
|
||||
})),
|
||||
digest: None,
|
||||
})],
|
||||
non_code_meta: NonCodeMeta::default(),
|
||||
digest: None,
|
||||
};
|
||||
|
||||
assert_eq!(result, expected_result);
|
||||
@ -2650,9 +2719,11 @@ e
|
||||
start: 0,
|
||||
end: 0,
|
||||
name: "a".to_owned(),
|
||||
digest: None,
|
||||
},
|
||||
type_: None,
|
||||
optional: true,
|
||||
digest: None,
|
||||
}],
|
||||
true,
|
||||
),
|
||||
@ -2662,9 +2733,11 @@ e
|
||||
start: 0,
|
||||
end: 0,
|
||||
name: "a".to_owned(),
|
||||
digest: None,
|
||||
},
|
||||
type_: None,
|
||||
optional: false,
|
||||
digest: None,
|
||||
}],
|
||||
true,
|
||||
),
|
||||
@ -2675,18 +2748,22 @@ e
|
||||
start: 0,
|
||||
end: 0,
|
||||
name: "a".to_owned(),
|
||||
digest: None,
|
||||
},
|
||||
type_: None,
|
||||
optional: false,
|
||||
digest: None,
|
||||
},
|
||||
Parameter {
|
||||
identifier: Identifier {
|
||||
start: 0,
|
||||
end: 0,
|
||||
name: "b".to_owned(),
|
||||
digest: None,
|
||||
},
|
||||
type_: None,
|
||||
optional: true,
|
||||
digest: None,
|
||||
},
|
||||
],
|
||||
true,
|
||||
@ -2698,18 +2775,22 @@ e
|
||||
start: 0,
|
||||
end: 0,
|
||||
name: "a".to_owned(),
|
||||
digest: None,
|
||||
},
|
||||
type_: None,
|
||||
optional: true,
|
||||
digest: None,
|
||||
},
|
||||
Parameter {
|
||||
identifier: Identifier {
|
||||
start: 0,
|
||||
end: 0,
|
||||
name: "b".to_owned(),
|
||||
digest: None,
|
||||
},
|
||||
type_: None,
|
||||
optional: false,
|
||||
digest: None,
|
||||
},
|
||||
],
|
||||
false,
|
||||
@ -2741,6 +2822,7 @@ e
|
||||
start: 6,
|
||||
end: 13,
|
||||
name: "myArray".to_string(),
|
||||
digest: None,
|
||||
},
|
||||
init: Value::ArrayExpression(Box::new(ArrayExpression {
|
||||
start: 16,
|
||||
@ -2751,73 +2833,88 @@ e
|
||||
end: 18,
|
||||
value: 0u32.into(),
|
||||
raw: "0".to_string(),
|
||||
digest: None,
|
||||
})),
|
||||
Value::Literal(Box::new(Literal {
|
||||
start: 17,
|
||||
end: 18,
|
||||
value: 1u32.into(),
|
||||
raw: "1".to_string(),
|
||||
digest: None,
|
||||
})),
|
||||
Value::Literal(Box::new(Literal {
|
||||
start: 17,
|
||||
end: 18,
|
||||
value: 2u32.into(),
|
||||
raw: "2".to_string(),
|
||||
digest: None,
|
||||
})),
|
||||
Value::Literal(Box::new(Literal {
|
||||
start: 17,
|
||||
end: 18,
|
||||
value: 3u32.into(),
|
||||
raw: "3".to_string(),
|
||||
digest: None,
|
||||
})),
|
||||
Value::Literal(Box::new(Literal {
|
||||
start: 17,
|
||||
end: 18,
|
||||
value: 4u32.into(),
|
||||
raw: "4".to_string(),
|
||||
digest: None,
|
||||
})),
|
||||
Value::Literal(Box::new(Literal {
|
||||
start: 17,
|
||||
end: 18,
|
||||
value: 5u32.into(),
|
||||
raw: "5".to_string(),
|
||||
digest: None,
|
||||
})),
|
||||
Value::Literal(Box::new(Literal {
|
||||
start: 17,
|
||||
end: 18,
|
||||
value: 6u32.into(),
|
||||
raw: "6".to_string(),
|
||||
digest: None,
|
||||
})),
|
||||
Value::Literal(Box::new(Literal {
|
||||
start: 17,
|
||||
end: 18,
|
||||
value: 7u32.into(),
|
||||
raw: "7".to_string(),
|
||||
digest: None,
|
||||
})),
|
||||
Value::Literal(Box::new(Literal {
|
||||
start: 17,
|
||||
end: 18,
|
||||
value: 8u32.into(),
|
||||
raw: "8".to_string(),
|
||||
digest: None,
|
||||
})),
|
||||
Value::Literal(Box::new(Literal {
|
||||
start: 17,
|
||||
end: 18,
|
||||
value: 9u32.into(),
|
||||
raw: "9".to_string(),
|
||||
digest: None,
|
||||
})),
|
||||
Value::Literal(Box::new(Literal {
|
||||
start: 17,
|
||||
end: 18,
|
||||
value: 10u32.into(),
|
||||
raw: "10".to_string(),
|
||||
digest: None,
|
||||
})),
|
||||
],
|
||||
digest: None,
|
||||
})),
|
||||
digest: None,
|
||||
}],
|
||||
kind: VariableKind::Const,
|
||||
digest: None,
|
||||
})],
|
||||
non_code_meta: NonCodeMeta::default(),
|
||||
digest: None,
|
||||
};
|
||||
|
||||
assert_eq!(result, expected_result);
|
||||
|
@ -13,7 +13,8 @@ expression: actual
|
||||
"start": 0,
|
||||
"end": 1,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -21,6 +22,8 @@ expression: actual
|
||||
"start": 4,
|
||||
"end": 5,
|
||||
"value": 2,
|
||||
"raw": "2"
|
||||
}
|
||||
"raw": "2",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -13,7 +13,8 @@ expression: actual
|
||||
"start": 0,
|
||||
"end": 1,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -21,6 +22,8 @@ expression: actual
|
||||
"start": 2,
|
||||
"end": 3,
|
||||
"value": 2,
|
||||
"raw": "2"
|
||||
}
|
||||
"raw": "2",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -13,7 +13,8 @@ expression: actual
|
||||
"start": 0,
|
||||
"end": 1,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -21,6 +22,8 @@ expression: actual
|
||||
"start": 3,
|
||||
"end": 4,
|
||||
"value": 2,
|
||||
"raw": "2"
|
||||
}
|
||||
"raw": "2",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -13,7 +13,8 @@ expression: actual
|
||||
"start": 0,
|
||||
"end": 1,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "BinaryExpression",
|
||||
@ -27,7 +28,8 @@ expression: actual
|
||||
"start": 4,
|
||||
"end": 5,
|
||||
"value": 2,
|
||||
"raw": "2"
|
||||
"raw": "2",
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -35,7 +37,10 @@ expression: actual
|
||||
"start": 8,
|
||||
"end": 9,
|
||||
"value": 3,
|
||||
"raw": "3"
|
||||
}
|
||||
}
|
||||
"raw": "3",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -13,7 +13,8 @@ expression: actual
|
||||
"start": 0,
|
||||
"end": 1,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "BinaryExpression",
|
||||
@ -27,7 +28,8 @@ expression: actual
|
||||
"start": 6,
|
||||
"end": 7,
|
||||
"value": 2,
|
||||
"raw": "2"
|
||||
"raw": "2",
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -35,7 +37,10 @@ expression: actual
|
||||
"start": 10,
|
||||
"end": 11,
|
||||
"value": 3,
|
||||
"raw": "3"
|
||||
}
|
||||
}
|
||||
"raw": "3",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -19,7 +19,8 @@ expression: actual
|
||||
"start": 0,
|
||||
"end": 1,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "BinaryExpression",
|
||||
@ -33,7 +34,8 @@ expression: actual
|
||||
"start": 6,
|
||||
"end": 7,
|
||||
"value": 2,
|
||||
"raw": "2"
|
||||
"raw": "2",
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -41,9 +43,12 @@ expression: actual
|
||||
"start": 10,
|
||||
"end": 11,
|
||||
"value": 3,
|
||||
"raw": "3"
|
||||
}
|
||||
}
|
||||
"raw": "3",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -51,6 +56,8 @@ expression: actual
|
||||
"start": 16,
|
||||
"end": 17,
|
||||
"value": 4,
|
||||
"raw": "4"
|
||||
}
|
||||
"raw": "4",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -13,7 +13,8 @@ expression: actual
|
||||
"start": 0,
|
||||
"end": 1,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "BinaryExpression",
|
||||
@ -33,7 +34,8 @@ expression: actual
|
||||
"start": 6,
|
||||
"end": 7,
|
||||
"value": 2,
|
||||
"raw": "2"
|
||||
"raw": "2",
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -41,8 +43,10 @@ expression: actual
|
||||
"start": 10,
|
||||
"end": 11,
|
||||
"value": 3,
|
||||
"raw": "3"
|
||||
}
|
||||
"raw": "3",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -50,7 +54,10 @@ expression: actual
|
||||
"start": 16,
|
||||
"end": 17,
|
||||
"value": 4,
|
||||
"raw": "4"
|
||||
}
|
||||
}
|
||||
"raw": "4",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -13,7 +13,8 @@ expression: actual
|
||||
"start": 0,
|
||||
"end": 1,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "BinaryExpression",
|
||||
@ -39,7 +40,8 @@ expression: actual
|
||||
"start": 7,
|
||||
"end": 8,
|
||||
"value": 2,
|
||||
"raw": "2"
|
||||
"raw": "2",
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -47,8 +49,10 @@ expression: actual
|
||||
"start": 11,
|
||||
"end": 12,
|
||||
"value": 3,
|
||||
"raw": "3"
|
||||
}
|
||||
"raw": "3",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -56,8 +60,10 @@ expression: actual
|
||||
"start": 17,
|
||||
"end": 18,
|
||||
"value": 4,
|
||||
"raw": "4"
|
||||
}
|
||||
"raw": "4",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -65,7 +71,10 @@ expression: actual
|
||||
"start": 21,
|
||||
"end": 22,
|
||||
"value": 5,
|
||||
"raw": "5"
|
||||
}
|
||||
}
|
||||
"raw": "5",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -13,7 +13,8 @@ expression: actual
|
||||
"start": 0,
|
||||
"end": 1,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "BinaryExpression",
|
||||
@ -27,7 +28,8 @@ expression: actual
|
||||
"start": 8,
|
||||
"end": 9,
|
||||
"value": 2,
|
||||
"raw": "2"
|
||||
"raw": "2",
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -35,7 +37,10 @@ expression: actual
|
||||
"start": 12,
|
||||
"end": 13,
|
||||
"value": 3,
|
||||
"raw": "3"
|
||||
}
|
||||
}
|
||||
"raw": "3",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -30,23 +30,28 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 0,
|
||||
"end": 8,
|
||||
"name": "distance"
|
||||
"name": "distance",
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "Identifier",
|
||||
"type": "Identifier",
|
||||
"start": 11,
|
||||
"end": 12,
|
||||
"name": "p"
|
||||
}
|
||||
"name": "p",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "Identifier",
|
||||
"type": "Identifier",
|
||||
"start": 15,
|
||||
"end": 18,
|
||||
"name": "FOS"
|
||||
}
|
||||
"name": "FOS",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -54,8 +59,10 @@ expression: actual
|
||||
"start": 21,
|
||||
"end": 22,
|
||||
"value": 6,
|
||||
"raw": "6"
|
||||
}
|
||||
"raw": "6",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "BinaryExpression",
|
||||
@ -68,14 +75,18 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 26,
|
||||
"end": 36,
|
||||
"name": "sigmaAllow"
|
||||
"name": "sigmaAllow",
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "Identifier",
|
||||
"type": "Identifier",
|
||||
"start": 39,
|
||||
"end": 44,
|
||||
"name": "width"
|
||||
}
|
||||
}
|
||||
"name": "width",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -13,7 +13,8 @@ expression: actual
|
||||
"start": 0,
|
||||
"end": 1,
|
||||
"value": 2,
|
||||
"raw": "2"
|
||||
"raw": "2",
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -21,6 +22,8 @@ expression: actual
|
||||
"start": 7,
|
||||
"end": 8,
|
||||
"value": 3,
|
||||
"raw": "3"
|
||||
}
|
||||
"raw": "3",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 15,
|
||||
"name": "boxSketch"
|
||||
"name": "boxSketch",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "PipeExpression",
|
||||
@ -37,7 +38,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 18,
|
||||
"end": 31,
|
||||
"name": "startSketchAt"
|
||||
"name": "startSketchAt",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -52,7 +54,8 @@ expression: actual
|
||||
"start": 33,
|
||||
"end": 34,
|
||||
"value": 0,
|
||||
"raw": "0"
|
||||
"raw": "0",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -60,12 +63,15 @@ expression: actual
|
||||
"start": 36,
|
||||
"end": 37,
|
||||
"value": 0,
|
||||
"raw": "0"
|
||||
"raw": "0",
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
],
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
"optional": false,
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "CallExpression",
|
||||
@ -76,7 +82,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 47,
|
||||
"end": 51,
|
||||
"name": "line"
|
||||
"name": "line",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -91,7 +98,8 @@ expression: actual
|
||||
"start": 53,
|
||||
"end": 54,
|
||||
"value": 0,
|
||||
"raw": "0"
|
||||
"raw": "0",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -99,18 +107,22 @@ expression: actual
|
||||
"start": 56,
|
||||
"end": 58,
|
||||
"value": 10,
|
||||
"raw": "10"
|
||||
"raw": "10",
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
],
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution",
|
||||
"start": 61,
|
||||
"end": 62
|
||||
"end": 62,
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
"optional": false,
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "CallExpression",
|
||||
@ -121,7 +133,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 71,
|
||||
"end": 84,
|
||||
"name": "tangentialArc"
|
||||
"name": "tangentialArc",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -142,8 +155,10 @@ expression: actual
|
||||
"start": 87,
|
||||
"end": 88,
|
||||
"value": 5,
|
||||
"raw": "5"
|
||||
}
|
||||
"raw": "5",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -151,18 +166,22 @@ expression: actual
|
||||
"start": 90,
|
||||
"end": 91,
|
||||
"value": 5,
|
||||
"raw": "5"
|
||||
"raw": "5",
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
],
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution",
|
||||
"start": 94,
|
||||
"end": 95
|
||||
"end": 95,
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
"optional": false,
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "CallExpression",
|
||||
@ -173,7 +192,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 104,
|
||||
"end": 108,
|
||||
"name": "line"
|
||||
"name": "line",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -188,7 +208,8 @@ expression: actual
|
||||
"start": 110,
|
||||
"end": 111,
|
||||
"value": 5,
|
||||
"raw": "5"
|
||||
"raw": "5",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "UnaryExpression",
|
||||
@ -202,19 +223,24 @@ expression: actual
|
||||
"start": 114,
|
||||
"end": 116,
|
||||
"value": 15,
|
||||
"raw": "15"
|
||||
}
|
||||
"raw": "15",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
],
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution",
|
||||
"start": 119,
|
||||
"end": 120
|
||||
"end": 120,
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
"optional": false,
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "CallExpression",
|
||||
@ -225,7 +251,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 129,
|
||||
"end": 136,
|
||||
"name": "extrude"
|
||||
"name": "extrude",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -234,30 +261,39 @@ expression: actual
|
||||
"start": 137,
|
||||
"end": 139,
|
||||
"value": 10,
|
||||
"raw": "10"
|
||||
"raw": "10",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution",
|
||||
"start": 141,
|
||||
"end": 142
|
||||
"end": 142,
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
"optional": false,
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 8,
|
||||
"name": "sg"
|
||||
"name": "sg",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "UnaryExpression",
|
||||
@ -33,16 +34,22 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 12,
|
||||
"end": 17,
|
||||
"name": "scale"
|
||||
}
|
||||
}
|
||||
"name": "scale",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 0,
|
||||
"end": 6,
|
||||
"name": "lineTo"
|
||||
"name": "lineTo",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -37,7 +38,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 9,
|
||||
"end": 11,
|
||||
"name": "to"
|
||||
"name": "to",
|
||||
"digest": null
|
||||
},
|
||||
"value": {
|
||||
"type": "ArrayExpression",
|
||||
@ -51,7 +53,8 @@ expression: actual
|
||||
"start": 14,
|
||||
"end": 15,
|
||||
"value": 0,
|
||||
"raw": "0"
|
||||
"raw": "0",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "UnaryExpression",
|
||||
@ -65,21 +68,30 @@ expression: actual
|
||||
"start": 18,
|
||||
"end": 19,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
}
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
],
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
}
|
||||
"optional": false,
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 13,
|
||||
"name": "myArray"
|
||||
"name": "myArray",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "ArrayExpression",
|
||||
@ -34,7 +35,8 @@ expression: actual
|
||||
"start": 17,
|
||||
"end": 18,
|
||||
"value": 0,
|
||||
"raw": "0"
|
||||
"raw": "0",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -42,7 +44,8 @@ expression: actual
|
||||
"start": 17,
|
||||
"end": 18,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -50,7 +53,8 @@ expression: actual
|
||||
"start": 17,
|
||||
"end": 18,
|
||||
"value": 2,
|
||||
"raw": "2"
|
||||
"raw": "2",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -58,7 +62,8 @@ expression: actual
|
||||
"start": 17,
|
||||
"end": 18,
|
||||
"value": 3,
|
||||
"raw": "3"
|
||||
"raw": "3",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -66,7 +71,8 @@ expression: actual
|
||||
"start": 17,
|
||||
"end": 18,
|
||||
"value": 4,
|
||||
"raw": "4"
|
||||
"raw": "4",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -74,7 +80,8 @@ expression: actual
|
||||
"start": 17,
|
||||
"end": 18,
|
||||
"value": 5,
|
||||
"raw": "5"
|
||||
"raw": "5",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -82,7 +89,8 @@ expression: actual
|
||||
"start": 17,
|
||||
"end": 18,
|
||||
"value": 6,
|
||||
"raw": "6"
|
||||
"raw": "6",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -90,7 +98,8 @@ expression: actual
|
||||
"start": 17,
|
||||
"end": 18,
|
||||
"value": 7,
|
||||
"raw": "7"
|
||||
"raw": "7",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -98,7 +107,8 @@ expression: actual
|
||||
"start": 17,
|
||||
"end": 18,
|
||||
"value": 8,
|
||||
"raw": "8"
|
||||
"raw": "8",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -106,7 +116,8 @@ expression: actual
|
||||
"start": 17,
|
||||
"end": 18,
|
||||
"value": 9,
|
||||
"raw": "9"
|
||||
"raw": "9",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -114,17 +125,23 @@ expression: actual
|
||||
"start": 17,
|
||||
"end": 18,
|
||||
"value": 10,
|
||||
"raw": "10"
|
||||
"raw": "10",
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 8,
|
||||
"end": 24,
|
||||
"name": "firstPrimeNumber"
|
||||
"name": "firstPrimeNumber",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "FunctionExpression",
|
||||
@ -43,19 +44,26 @@ expression: actual
|
||||
"start": 50,
|
||||
"end": 51,
|
||||
"value": 2,
|
||||
"raw": "2"
|
||||
}
|
||||
"raw": "2",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
}
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "fn"
|
||||
"kind": "fn",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "ExpressionStatement",
|
||||
@ -71,15 +79,20 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 62,
|
||||
"end": 78,
|
||||
"name": "firstPrimeNumber"
|
||||
"name": "firstPrimeNumber",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [],
|
||||
"optional": false
|
||||
}
|
||||
"optional": false,
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 3,
|
||||
"end": 8,
|
||||
"name": "thing"
|
||||
"name": "thing",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "FunctionExpression",
|
||||
@ -34,9 +35,11 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 12,
|
||||
"end": 17,
|
||||
"name": "param"
|
||||
"name": "param",
|
||||
"digest": null
|
||||
},
|
||||
"optional": false
|
||||
"optional": false,
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
@ -54,19 +57,26 @@ expression: actual
|
||||
"start": 39,
|
||||
"end": 43,
|
||||
"value": true,
|
||||
"raw": "true"
|
||||
}
|
||||
"raw": "true",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
}
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "fn"
|
||||
"kind": "fn",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "ExpressionStatement",
|
||||
@ -82,7 +92,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 54,
|
||||
"end": 59,
|
||||
"name": "thing"
|
||||
"name": "thing",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -91,15 +102,20 @@ expression: actual
|
||||
"start": 60,
|
||||
"end": 65,
|
||||
"value": false,
|
||||
"raw": "false"
|
||||
"raw": "false",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
}
|
||||
"optional": false,
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 14,
|
||||
"name": "mySketch"
|
||||
"name": "mySketch",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "PipeExpression",
|
||||
@ -37,7 +38,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 17,
|
||||
"end": 30,
|
||||
"name": "startSketchAt"
|
||||
"name": "startSketchAt",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -52,7 +54,8 @@ expression: actual
|
||||
"start": 32,
|
||||
"end": 33,
|
||||
"value": 0,
|
||||
"raw": "0"
|
||||
"raw": "0",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -60,12 +63,15 @@ expression: actual
|
||||
"start": 34,
|
||||
"end": 35,
|
||||
"value": 0,
|
||||
"raw": "0"
|
||||
"raw": "0",
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
],
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
"optional": false,
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "CallExpression",
|
||||
@ -76,7 +82,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 49,
|
||||
"end": 55,
|
||||
"name": "lineTo"
|
||||
"name": "lineTo",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -91,7 +98,8 @@ expression: actual
|
||||
"start": 57,
|
||||
"end": 58,
|
||||
"value": 0,
|
||||
"raw": "0"
|
||||
"raw": "0",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -99,25 +107,30 @@ expression: actual
|
||||
"start": 60,
|
||||
"end": 61,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
],
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution",
|
||||
"start": 64,
|
||||
"end": 65
|
||||
"end": 65,
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "TagDeclarator",
|
||||
"type": "TagDeclarator",
|
||||
"start": 67,
|
||||
"end": 75,
|
||||
"value": "myPath"
|
||||
"value": "myPath",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
"optional": false,
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "CallExpression",
|
||||
@ -128,7 +141,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 88,
|
||||
"end": 94,
|
||||
"name": "lineTo"
|
||||
"name": "lineTo",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -143,7 +157,8 @@ expression: actual
|
||||
"start": 96,
|
||||
"end": 97,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -151,18 +166,22 @@ expression: actual
|
||||
"start": 99,
|
||||
"end": 100,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
],
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution",
|
||||
"start": 103,
|
||||
"end": 104
|
||||
"end": 104,
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
"optional": false,
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "CallExpression",
|
||||
@ -173,7 +192,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 117,
|
||||
"end": 123,
|
||||
"name": "lineTo"
|
||||
"name": "lineTo",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -188,7 +208,8 @@ expression: actual
|
||||
"start": 125,
|
||||
"end": 126,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -196,25 +217,30 @@ expression: actual
|
||||
"start": 128,
|
||||
"end": 129,
|
||||
"value": 0,
|
||||
"raw": "0"
|
||||
"raw": "0",
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
],
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution",
|
||||
"start": 132,
|
||||
"end": 133
|
||||
"end": 133,
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "TagDeclarator",
|
||||
"type": "TagDeclarator",
|
||||
"start": 135,
|
||||
"end": 146,
|
||||
"value": "rightPath"
|
||||
"value": "rightPath",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
"optional": false,
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "CallExpression",
|
||||
@ -225,31 +251,40 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 159,
|
||||
"end": 164,
|
||||
"name": "close"
|
||||
"name": "close",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution",
|
||||
"start": 165,
|
||||
"end": 166
|
||||
"end": 166,
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
"optional": false,
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 14,
|
||||
"name": "mySketch"
|
||||
"name": "mySketch",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "PipeExpression",
|
||||
@ -37,7 +38,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 17,
|
||||
"end": 30,
|
||||
"name": "startSketchAt"
|
||||
"name": "startSketchAt",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -52,7 +54,8 @@ expression: actual
|
||||
"start": 32,
|
||||
"end": 33,
|
||||
"value": 0,
|
||||
"raw": "0"
|
||||
"raw": "0",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -60,12 +63,15 @@ expression: actual
|
||||
"start": 34,
|
||||
"end": 35,
|
||||
"value": 0,
|
||||
"raw": "0"
|
||||
"raw": "0",
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
],
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
"optional": false,
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "CallExpression",
|
||||
@ -76,7 +82,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 41,
|
||||
"end": 47,
|
||||
"name": "lineTo"
|
||||
"name": "lineTo",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -91,7 +98,8 @@ expression: actual
|
||||
"start": 49,
|
||||
"end": 50,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -99,18 +107,22 @@ expression: actual
|
||||
"start": 52,
|
||||
"end": 53,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
],
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution",
|
||||
"start": 56,
|
||||
"end": 57
|
||||
"end": 57,
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
"optional": false,
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "CallExpression",
|
||||
@ -121,31 +133,40 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 62,
|
||||
"end": 67,
|
||||
"name": "close"
|
||||
"name": "close",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution",
|
||||
"start": 68,
|
||||
"end": 69
|
||||
"end": 69,
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
"optional": false,
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 11,
|
||||
"name": "myBox"
|
||||
"name": "myBox",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "CallExpression",
|
||||
@ -31,7 +32,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 14,
|
||||
"end": 27,
|
||||
"name": "startSketchAt"
|
||||
"name": "startSketchAt",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -39,18 +41,24 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 28,
|
||||
"end": 29,
|
||||
"name": "p"
|
||||
"name": "p",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
}
|
||||
"optional": false,
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 11,
|
||||
"name": "myBox"
|
||||
"name": "myBox",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "PipeExpression",
|
||||
@ -37,7 +38,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 14,
|
||||
"end": 15,
|
||||
"name": "f"
|
||||
"name": "f",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -46,10 +48,12 @@ expression: actual
|
||||
"start": 16,
|
||||
"end": 17,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
"optional": false,
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "CallExpression",
|
||||
@ -60,7 +64,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 22,
|
||||
"end": 23,
|
||||
"name": "g"
|
||||
"name": "g",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -69,30 +74,39 @@ expression: actual
|
||||
"start": 24,
|
||||
"end": 25,
|
||||
"value": 2,
|
||||
"raw": "2"
|
||||
"raw": "2",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution",
|
||||
"start": 27,
|
||||
"end": 28
|
||||
"end": 28,
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
"optional": false,
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 11,
|
||||
"name": "myBox"
|
||||
"name": "myBox",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "PipeExpression",
|
||||
@ -37,7 +38,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 14,
|
||||
"end": 27,
|
||||
"name": "startSketchAt"
|
||||
"name": "startSketchAt",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -45,10 +47,12 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 28,
|
||||
"end": 29,
|
||||
"name": "p"
|
||||
"name": "p",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
"optional": false,
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "CallExpression",
|
||||
@ -59,7 +63,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 34,
|
||||
"end": 38,
|
||||
"name": "line"
|
||||
"name": "line",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -74,39 +79,50 @@ expression: actual
|
||||
"start": 40,
|
||||
"end": 41,
|
||||
"value": 0,
|
||||
"raw": "0"
|
||||
"raw": "0",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Identifier",
|
||||
"type": "Identifier",
|
||||
"start": 43,
|
||||
"end": 44,
|
||||
"name": "l"
|
||||
"name": "l",
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
],
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution",
|
||||
"start": 47,
|
||||
"end": 48
|
||||
"end": 48,
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
"optional": false,
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 0,
|
||||
"end": 6,
|
||||
"name": "lineTo"
|
||||
"name": "lineTo",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -37,7 +38,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 9,
|
||||
"end": 11,
|
||||
"name": "to"
|
||||
"name": "to",
|
||||
"digest": null
|
||||
},
|
||||
"value": {
|
||||
"type": "ArrayExpression",
|
||||
@ -51,7 +53,8 @@ expression: actual
|
||||
"start": 14,
|
||||
"end": 15,
|
||||
"value": 0,
|
||||
"raw": "0"
|
||||
"raw": "0",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -59,20 +62,28 @@ expression: actual
|
||||
"start": 17,
|
||||
"end": 18,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
],
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
}
|
||||
"optional": false,
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 0,
|
||||
"end": 6,
|
||||
"name": "lineTo"
|
||||
"name": "lineTo",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -37,7 +38,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 9,
|
||||
"end": 11,
|
||||
"name": "to"
|
||||
"name": "to",
|
||||
"digest": null
|
||||
},
|
||||
"value": {
|
||||
"type": "ArrayExpression",
|
||||
@ -51,7 +53,8 @@ expression: actual
|
||||
"start": 14,
|
||||
"end": 15,
|
||||
"value": 0,
|
||||
"raw": "0"
|
||||
"raw": "0",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -59,10 +62,13 @@ expression: actual
|
||||
"start": 17,
|
||||
"end": 18,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "ObjectProperty",
|
||||
@ -72,7 +78,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 21,
|
||||
"end": 25,
|
||||
"name": "from"
|
||||
"name": "from",
|
||||
"digest": null
|
||||
},
|
||||
"value": {
|
||||
"type": "ArrayExpression",
|
||||
@ -86,7 +93,8 @@ expression: actual
|
||||
"start": 28,
|
||||
"end": 29,
|
||||
"value": 3,
|
||||
"raw": "3"
|
||||
"raw": "3",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -94,20 +102,28 @@ expression: actual
|
||||
"start": 31,
|
||||
"end": 32,
|
||||
"value": 3,
|
||||
"raw": "3"
|
||||
"raw": "3",
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
],
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
}
|
||||
"optional": false,
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 0,
|
||||
"end": 6,
|
||||
"name": "lineTo"
|
||||
"name": "lineTo",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -37,7 +38,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 8,
|
||||
"end": 10,
|
||||
"name": "to"
|
||||
"name": "to",
|
||||
"digest": null
|
||||
},
|
||||
"value": {
|
||||
"type": "ArrayExpression",
|
||||
@ -51,7 +53,8 @@ expression: actual
|
||||
"start": 12,
|
||||
"end": 13,
|
||||
"value": 0,
|
||||
"raw": "0"
|
||||
"raw": "0",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -59,20 +62,28 @@ expression: actual
|
||||
"start": 15,
|
||||
"end": 16,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
],
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
}
|
||||
"optional": false,
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 0,
|
||||
"end": 6,
|
||||
"name": "lineTo"
|
||||
"name": "lineTo",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -37,7 +38,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 9,
|
||||
"end": 11,
|
||||
"name": "to"
|
||||
"name": "to",
|
||||
"digest": null
|
||||
},
|
||||
"value": {
|
||||
"type": "ArrayExpression",
|
||||
@ -51,7 +53,8 @@ expression: actual
|
||||
"start": 14,
|
||||
"end": 15,
|
||||
"value": 0,
|
||||
"raw": "0"
|
||||
"raw": "0",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -59,10 +62,13 @@ expression: actual
|
||||
"start": 17,
|
||||
"end": 18,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "ObjectProperty",
|
||||
@ -72,7 +78,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 21,
|
||||
"end": 25,
|
||||
"name": "from"
|
||||
"name": "from",
|
||||
"digest": null
|
||||
},
|
||||
"value": {
|
||||
"type": "ArrayExpression",
|
||||
@ -86,7 +93,8 @@ expression: actual
|
||||
"start": 28,
|
||||
"end": 29,
|
||||
"value": 3,
|
||||
"raw": "3"
|
||||
"raw": "3",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -94,20 +102,28 @@ expression: actual
|
||||
"start": 31,
|
||||
"end": 32,
|
||||
"value": 3,
|
||||
"raw": "3"
|
||||
"raw": "3",
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
],
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
}
|
||||
"optional": false,
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 0,
|
||||
"end": 6,
|
||||
"name": "lineTo"
|
||||
"name": "lineTo",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -37,7 +38,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 9,
|
||||
"end": 11,
|
||||
"name": "to"
|
||||
"name": "to",
|
||||
"digest": null
|
||||
},
|
||||
"value": {
|
||||
"type": "ArrayExpression",
|
||||
@ -51,7 +53,8 @@ expression: actual
|
||||
"start": 14,
|
||||
"end": 15,
|
||||
"value": 0,
|
||||
"raw": "0"
|
||||
"raw": "0",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -59,10 +62,13 @@ expression: actual
|
||||
"start": 17,
|
||||
"end": 18,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "ObjectProperty",
|
||||
@ -72,7 +78,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 20,
|
||||
"end": 24,
|
||||
"name": "from"
|
||||
"name": "from",
|
||||
"digest": null
|
||||
},
|
||||
"value": {
|
||||
"type": "ArrayExpression",
|
||||
@ -86,7 +93,8 @@ expression: actual
|
||||
"start": 27,
|
||||
"end": 28,
|
||||
"value": 3,
|
||||
"raw": "3"
|
||||
"raw": "3",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -94,20 +102,28 @@ expression: actual
|
||||
"start": 30,
|
||||
"end": 31,
|
||||
"value": 3,
|
||||
"raw": "3"
|
||||
"raw": "3",
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
],
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
}
|
||||
"optional": false,
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 14,
|
||||
"name": "mySketch"
|
||||
"name": "mySketch",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "CallExpression",
|
||||
@ -31,7 +32,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 17,
|
||||
"end": 30,
|
||||
"name": "startSketchAt"
|
||||
"name": "startSketchAt",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -46,7 +48,8 @@ expression: actual
|
||||
"start": 32,
|
||||
"end": 33,
|
||||
"value": 0,
|
||||
"raw": "0"
|
||||
"raw": "0",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -54,20 +57,27 @@ expression: actual
|
||||
"start": 34,
|
||||
"end": 35,
|
||||
"value": 0,
|
||||
"raw": "0"
|
||||
"raw": "0",
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
],
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
}
|
||||
"optional": false,
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 0,
|
||||
"end": 3,
|
||||
"name": "log"
|
||||
"name": "log",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -29,7 +30,8 @@ expression: actual
|
||||
"start": 4,
|
||||
"end": 5,
|
||||
"value": 5,
|
||||
"raw": "5"
|
||||
"raw": "5",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -37,22 +39,28 @@ expression: actual
|
||||
"start": 7,
|
||||
"end": 14,
|
||||
"value": "hello",
|
||||
"raw": "\"hello\""
|
||||
"raw": "\"hello\"",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Identifier",
|
||||
"type": "Identifier",
|
||||
"start": 16,
|
||||
"end": 27,
|
||||
"name": "aIdentifier"
|
||||
"name": "aIdentifier",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
}
|
||||
"optional": false,
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -23,7 +23,8 @@ expression: actual
|
||||
"start": 0,
|
||||
"end": 1,
|
||||
"value": 5,
|
||||
"raw": "5"
|
||||
"raw": "5",
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -31,13 +32,18 @@ expression: actual
|
||||
"start": 4,
|
||||
"end": 7,
|
||||
"value": "a",
|
||||
"raw": "\"a\""
|
||||
}
|
||||
}
|
||||
"raw": "\"a\"",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 0,
|
||||
"end": 4,
|
||||
"name": "line"
|
||||
"name": "line",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -35,30 +36,38 @@ expression: actual
|
||||
"start": 6,
|
||||
"end": 7,
|
||||
"value": 0,
|
||||
"raw": "0"
|
||||
"raw": "0",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Identifier",
|
||||
"type": "Identifier",
|
||||
"start": 9,
|
||||
"end": 10,
|
||||
"name": "l"
|
||||
"name": "l",
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
],
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution",
|
||||
"start": 13,
|
||||
"end": 14
|
||||
"end": 14,
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
}
|
||||
"optional": false,
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 14,
|
||||
"name": "cylinder"
|
||||
"name": "cylinder",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "PipeExpression",
|
||||
@ -37,7 +38,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 17,
|
||||
"end": 30,
|
||||
"name": "startSketchOn"
|
||||
"name": "startSketchOn",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -46,10 +48,12 @@ expression: actual
|
||||
"start": 31,
|
||||
"end": 35,
|
||||
"value": "XY",
|
||||
"raw": "'XY'"
|
||||
"raw": "'XY'",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
"optional": false,
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "CallExpression",
|
||||
@ -60,7 +64,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 44,
|
||||
"end": 50,
|
||||
"name": "circle"
|
||||
"name": "circle",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -75,7 +80,8 @@ expression: actual
|
||||
"start": 52,
|
||||
"end": 53,
|
||||
"value": 0,
|
||||
"raw": "0"
|
||||
"raw": "0",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -83,9 +89,11 @@ expression: actual
|
||||
"start": 54,
|
||||
"end": 55,
|
||||
"value": 0,
|
||||
"raw": "0"
|
||||
"raw": "0",
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
],
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -93,16 +101,19 @@ expression: actual
|
||||
"start": 58,
|
||||
"end": 60,
|
||||
"value": 22,
|
||||
"raw": "22"
|
||||
"raw": "22",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution",
|
||||
"start": 62,
|
||||
"end": 63
|
||||
"end": 63,
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
"optional": false,
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "CallExpression",
|
||||
@ -113,7 +124,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 72,
|
||||
"end": 79,
|
||||
"name": "extrude"
|
||||
"name": "extrude",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -122,30 +134,39 @@ expression: actual
|
||||
"start": 80,
|
||||
"end": 82,
|
||||
"value": 14,
|
||||
"raw": "14"
|
||||
"raw": "14",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution",
|
||||
"start": 84,
|
||||
"end": 85
|
||||
"end": 85,
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
"optional": false,
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 3,
|
||||
"end": 4,
|
||||
"name": "f"
|
||||
"name": "f",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "FunctionExpression",
|
||||
@ -34,9 +35,11 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 8,
|
||||
"end": 13,
|
||||
"name": "angle"
|
||||
"name": "angle",
|
||||
"digest": null
|
||||
},
|
||||
"optional": true
|
||||
"optional": true,
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
@ -57,7 +60,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 28,
|
||||
"end": 35,
|
||||
"name": "default"
|
||||
"name": "default",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -65,7 +69,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 36,
|
||||
"end": 41,
|
||||
"name": "angle"
|
||||
"name": "angle",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -73,26 +78,36 @@ expression: actual
|
||||
"start": 43,
|
||||
"end": 46,
|
||||
"value": 360,
|
||||
"raw": "360"
|
||||
"raw": "360",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
}
|
||||
"optional": false,
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
}
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "fn"
|
||||
"kind": "fn",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 11,
|
||||
"name": "myVar"
|
||||
"name": "myVar",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "CallExpression",
|
||||
@ -31,7 +32,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 14,
|
||||
"end": 17,
|
||||
"name": "min"
|
||||
"name": "min",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -40,7 +42,8 @@ expression: actual
|
||||
"start": 18,
|
||||
"end": 19,
|
||||
"value": 5,
|
||||
"raw": "5"
|
||||
"raw": "5",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "UnaryExpression",
|
||||
@ -57,7 +60,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 23,
|
||||
"end": 29,
|
||||
"name": "legLen"
|
||||
"name": "legLen",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -66,7 +70,8 @@ expression: actual
|
||||
"start": 30,
|
||||
"end": 31,
|
||||
"value": 5,
|
||||
"raw": "5"
|
||||
"raw": "5",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -74,22 +79,30 @@ expression: actual
|
||||
"start": 33,
|
||||
"end": 34,
|
||||
"value": 4,
|
||||
"raw": "4"
|
||||
"raw": "4",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
}
|
||||
"optional": false,
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
}
|
||||
"optional": false,
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 11,
|
||||
"name": "myVar"
|
||||
"name": "myVar",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "CallExpression",
|
||||
@ -31,7 +32,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 14,
|
||||
"end": 17,
|
||||
"name": "min"
|
||||
"name": "min",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -49,7 +51,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 19,
|
||||
"end": 25,
|
||||
"name": "legLen"
|
||||
"name": "legLen",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -58,7 +61,8 @@ expression: actual
|
||||
"start": 26,
|
||||
"end": 27,
|
||||
"value": 5,
|
||||
"raw": "5"
|
||||
"raw": "5",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -66,11 +70,14 @@ expression: actual
|
||||
"start": 29,
|
||||
"end": 30,
|
||||
"value": 4,
|
||||
"raw": "4"
|
||||
"raw": "4",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
}
|
||||
"optional": false,
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -78,18 +85,24 @@ expression: actual
|
||||
"start": 33,
|
||||
"end": 34,
|
||||
"value": 5,
|
||||
"raw": "5"
|
||||
"raw": "5",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
}
|
||||
"optional": false,
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 11,
|
||||
"name": "myVar"
|
||||
"name": "myVar",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "PipeExpression",
|
||||
@ -40,7 +41,8 @@ expression: actual
|
||||
"start": 14,
|
||||
"end": 15,
|
||||
"value": 5,
|
||||
"raw": "5"
|
||||
"raw": "5",
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -48,8 +50,10 @@ expression: actual
|
||||
"start": 18,
|
||||
"end": 19,
|
||||
"value": 6,
|
||||
"raw": "6"
|
||||
}
|
||||
"raw": "6",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "CallExpression",
|
||||
@ -60,7 +64,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 23,
|
||||
"end": 29,
|
||||
"name": "myFunc"
|
||||
"name": "myFunc",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -69,30 +74,39 @@ expression: actual
|
||||
"start": 30,
|
||||
"end": 32,
|
||||
"value": 45,
|
||||
"raw": "45"
|
||||
"raw": "45",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution",
|
||||
"start": 34,
|
||||
"end": 35
|
||||
"end": 35,
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
"optional": false,
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 7,
|
||||
"name": "x"
|
||||
"name": "x",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "BinaryExpression",
|
||||
@ -39,24 +40,32 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 11,
|
||||
"end": 15,
|
||||
"name": "leg2"
|
||||
}
|
||||
"name": "leg2",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "Identifier",
|
||||
"type": "Identifier",
|
||||
"start": 18,
|
||||
"end": 27,
|
||||
"name": "thickness"
|
||||
}
|
||||
}
|
||||
"name": "thickness",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 4,
|
||||
"end": 5,
|
||||
"name": "x"
|
||||
"name": "x",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "BinaryExpression",
|
||||
@ -34,7 +35,8 @@ expression: actual
|
||||
"start": 8,
|
||||
"end": 9,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "BinaryExpression",
|
||||
@ -48,7 +50,8 @@ expression: actual
|
||||
"start": 13,
|
||||
"end": 14,
|
||||
"value": 3,
|
||||
"raw": "3"
|
||||
"raw": "3",
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -56,17 +59,24 @@ expression: actual
|
||||
"start": 17,
|
||||
"end": 18,
|
||||
"value": 4,
|
||||
"raw": "4"
|
||||
}
|
||||
}
|
||||
}
|
||||
"raw": "4",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "let"
|
||||
"kind": "let",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 7,
|
||||
"name": "x"
|
||||
"name": "x",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "Literal",
|
||||
@ -28,11 +29,14 @@ expression: actual
|
||||
"start": 10,
|
||||
"end": 11,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
}
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
@ -46,10 +50,13 @@ expression: actual
|
||||
"type": "inlineComment",
|
||||
"value": "this is an inline comment",
|
||||
"style": "line"
|
||||
}
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 3,
|
||||
"end": 4,
|
||||
"name": "x"
|
||||
"name": "x",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "FunctionExpression",
|
||||
@ -42,8 +43,10 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 30,
|
||||
"end": 32,
|
||||
"name": "sg"
|
||||
}
|
||||
"name": "sg",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "ReturnStatement",
|
||||
@ -55,23 +58,32 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 48,
|
||||
"end": 50,
|
||||
"name": "sg"
|
||||
}
|
||||
"name": "sg",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
}
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "fn"
|
||||
"kind": "fn",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 9,
|
||||
"name": "obj"
|
||||
"name": "obj",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "ObjectExpression",
|
||||
@ -36,7 +37,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 14,
|
||||
"end": 15,
|
||||
"name": "a"
|
||||
"name": "a",
|
||||
"digest": null
|
||||
},
|
||||
"value": {
|
||||
"type": "Literal",
|
||||
@ -44,8 +46,10 @@ expression: actual
|
||||
"start": 17,
|
||||
"end": 18,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
}
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "ObjectProperty",
|
||||
@ -55,7 +59,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 20,
|
||||
"end": 21,
|
||||
"name": "b"
|
||||
"name": "b",
|
||||
"digest": null
|
||||
},
|
||||
"value": {
|
||||
"type": "Literal",
|
||||
@ -63,14 +68,19 @@ expression: actual
|
||||
"start": 23,
|
||||
"end": 24,
|
||||
"value": 2,
|
||||
"raw": "2"
|
||||
}
|
||||
"raw": "2",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclaration",
|
||||
@ -86,7 +96,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 37,
|
||||
"end": 43,
|
||||
"name": "height"
|
||||
"name": "height",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "BinaryExpression",
|
||||
@ -100,7 +111,8 @@ expression: actual
|
||||
"start": 46,
|
||||
"end": 47,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "MemberExpression",
|
||||
@ -112,25 +124,33 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 50,
|
||||
"end": 53,
|
||||
"name": "obj"
|
||||
"name": "obj",
|
||||
"digest": null
|
||||
},
|
||||
"property": {
|
||||
"type": "Identifier",
|
||||
"type": "Identifier",
|
||||
"start": 54,
|
||||
"end": 55,
|
||||
"name": "a"
|
||||
"name": "a",
|
||||
"digest": null
|
||||
},
|
||||
"computed": false
|
||||
}
|
||||
}
|
||||
"computed": false,
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 9,
|
||||
"name": "obj"
|
||||
"name": "obj",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "ObjectExpression",
|
||||
@ -36,7 +37,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 14,
|
||||
"end": 15,
|
||||
"name": "a"
|
||||
"name": "a",
|
||||
"digest": null
|
||||
},
|
||||
"value": {
|
||||
"type": "Literal",
|
||||
@ -44,8 +46,10 @@ expression: actual
|
||||
"start": 17,
|
||||
"end": 18,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
}
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "ObjectProperty",
|
||||
@ -55,7 +59,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 20,
|
||||
"end": 21,
|
||||
"name": "b"
|
||||
"name": "b",
|
||||
"digest": null
|
||||
},
|
||||
"value": {
|
||||
"type": "Literal",
|
||||
@ -63,14 +68,19 @@ expression: actual
|
||||
"start": 23,
|
||||
"end": 24,
|
||||
"value": 2,
|
||||
"raw": "2"
|
||||
}
|
||||
"raw": "2",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclaration",
|
||||
@ -86,7 +96,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 38,
|
||||
"end": 44,
|
||||
"name": "height"
|
||||
"name": "height",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "BinaryExpression",
|
||||
@ -100,7 +111,8 @@ expression: actual
|
||||
"start": 47,
|
||||
"end": 48,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "MemberExpression",
|
||||
@ -112,7 +124,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 51,
|
||||
"end": 54,
|
||||
"name": "obj"
|
||||
"name": "obj",
|
||||
"digest": null
|
||||
},
|
||||
"property": {
|
||||
"type": "Literal",
|
||||
@ -120,18 +133,25 @@ expression: actual
|
||||
"start": 55,
|
||||
"end": 58,
|
||||
"value": "a",
|
||||
"raw": "\"a\""
|
||||
"raw": "\"a\"",
|
||||
"digest": null
|
||||
},
|
||||
"computed": false
|
||||
}
|
||||
}
|
||||
"computed": false,
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 9,
|
||||
"name": "obj"
|
||||
"name": "obj",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "ObjectExpression",
|
||||
@ -36,7 +37,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 14,
|
||||
"end": 15,
|
||||
"name": "a"
|
||||
"name": "a",
|
||||
"digest": null
|
||||
},
|
||||
"value": {
|
||||
"type": "Literal",
|
||||
@ -44,8 +46,10 @@ expression: actual
|
||||
"start": 17,
|
||||
"end": 18,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
}
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "ObjectProperty",
|
||||
@ -55,7 +59,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 20,
|
||||
"end": 21,
|
||||
"name": "b"
|
||||
"name": "b",
|
||||
"digest": null
|
||||
},
|
||||
"value": {
|
||||
"type": "Literal",
|
||||
@ -63,14 +68,19 @@ expression: actual
|
||||
"start": 23,
|
||||
"end": 24,
|
||||
"value": 2,
|
||||
"raw": "2"
|
||||
}
|
||||
"raw": "2",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclaration",
|
||||
@ -86,7 +96,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 37,
|
||||
"end": 43,
|
||||
"name": "height"
|
||||
"name": "height",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "BinaryExpression",
|
||||
@ -104,7 +115,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 46,
|
||||
"end": 49,
|
||||
"name": "obj"
|
||||
"name": "obj",
|
||||
"digest": null
|
||||
},
|
||||
"property": {
|
||||
"type": "Literal",
|
||||
@ -112,9 +124,11 @@ expression: actual
|
||||
"start": 50,
|
||||
"end": 53,
|
||||
"value": "a",
|
||||
"raw": "\"a\""
|
||||
"raw": "\"a\"",
|
||||
"digest": null
|
||||
},
|
||||
"computed": false
|
||||
"computed": false,
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -122,16 +136,22 @@ expression: actual
|
||||
"start": 57,
|
||||
"end": 58,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
}
|
||||
}
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 9,
|
||||
"name": "obj"
|
||||
"name": "obj",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "ObjectExpression",
|
||||
@ -36,7 +37,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 14,
|
||||
"end": 15,
|
||||
"name": "a"
|
||||
"name": "a",
|
||||
"digest": null
|
||||
},
|
||||
"value": {
|
||||
"type": "Literal",
|
||||
@ -44,8 +46,10 @@ expression: actual
|
||||
"start": 17,
|
||||
"end": 18,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
}
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "ObjectProperty",
|
||||
@ -55,7 +59,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 20,
|
||||
"end": 21,
|
||||
"name": "b"
|
||||
"name": "b",
|
||||
"digest": null
|
||||
},
|
||||
"value": {
|
||||
"type": "Literal",
|
||||
@ -63,14 +68,19 @@ expression: actual
|
||||
"start": 23,
|
||||
"end": 24,
|
||||
"value": 2,
|
||||
"raw": "2"
|
||||
}
|
||||
"raw": "2",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclaration",
|
||||
@ -86,7 +96,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 37,
|
||||
"end": 43,
|
||||
"name": "height"
|
||||
"name": "height",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "ArrayExpression",
|
||||
@ -106,7 +117,8 @@ expression: actual
|
||||
"start": 47,
|
||||
"end": 48,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "MemberExpression",
|
||||
@ -118,7 +130,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 51,
|
||||
"end": 54,
|
||||
"name": "obj"
|
||||
"name": "obj",
|
||||
"digest": null
|
||||
},
|
||||
"property": {
|
||||
"type": "Literal",
|
||||
@ -126,10 +139,13 @@ expression: actual
|
||||
"start": 55,
|
||||
"end": 58,
|
||||
"value": "a",
|
||||
"raw": "\"a\""
|
||||
"raw": "\"a\"",
|
||||
"digest": null
|
||||
},
|
||||
"computed": false
|
||||
}
|
||||
"computed": false,
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -137,17 +153,23 @@ expression: actual
|
||||
"start": 61,
|
||||
"end": 62,
|
||||
"value": 0,
|
||||
"raw": "0"
|
||||
"raw": "0",
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 9,
|
||||
"name": "obj"
|
||||
"name": "obj",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "ObjectExpression",
|
||||
@ -36,7 +37,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 14,
|
||||
"end": 15,
|
||||
"name": "a"
|
||||
"name": "a",
|
||||
"digest": null
|
||||
},
|
||||
"value": {
|
||||
"type": "Literal",
|
||||
@ -44,8 +46,10 @@ expression: actual
|
||||
"start": 17,
|
||||
"end": 18,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
}
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "ObjectProperty",
|
||||
@ -55,7 +59,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 20,
|
||||
"end": 21,
|
||||
"name": "b"
|
||||
"name": "b",
|
||||
"digest": null
|
||||
},
|
||||
"value": {
|
||||
"type": "Literal",
|
||||
@ -63,14 +68,19 @@ expression: actual
|
||||
"start": 23,
|
||||
"end": 24,
|
||||
"value": 2,
|
||||
"raw": "2"
|
||||
}
|
||||
"raw": "2",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclaration",
|
||||
@ -86,7 +96,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 37,
|
||||
"end": 43,
|
||||
"name": "height"
|
||||
"name": "height",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "ArrayExpression",
|
||||
@ -110,7 +121,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 47,
|
||||
"end": 50,
|
||||
"name": "obj"
|
||||
"name": "obj",
|
||||
"digest": null
|
||||
},
|
||||
"property": {
|
||||
"type": "Literal",
|
||||
@ -118,9 +130,11 @@ expression: actual
|
||||
"start": 51,
|
||||
"end": 54,
|
||||
"value": "a",
|
||||
"raw": "\"a\""
|
||||
"raw": "\"a\"",
|
||||
"digest": null
|
||||
},
|
||||
"computed": false
|
||||
"computed": false,
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -128,8 +142,10 @@ expression: actual
|
||||
"start": 58,
|
||||
"end": 59,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
}
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -137,17 +153,23 @@ expression: actual
|
||||
"start": 61,
|
||||
"end": 62,
|
||||
"value": 0,
|
||||
"raw": "0"
|
||||
"raw": "0",
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 9,
|
||||
"name": "obj"
|
||||
"name": "obj",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "ObjectExpression",
|
||||
@ -36,7 +37,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 14,
|
||||
"end": 15,
|
||||
"name": "a"
|
||||
"name": "a",
|
||||
"digest": null
|
||||
},
|
||||
"value": {
|
||||
"type": "Literal",
|
||||
@ -44,8 +46,10 @@ expression: actual
|
||||
"start": 17,
|
||||
"end": 18,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
}
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "ObjectProperty",
|
||||
@ -55,7 +59,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 20,
|
||||
"end": 21,
|
||||
"name": "b"
|
||||
"name": "b",
|
||||
"digest": null
|
||||
},
|
||||
"value": {
|
||||
"type": "Literal",
|
||||
@ -63,14 +68,19 @@ expression: actual
|
||||
"start": 23,
|
||||
"end": 24,
|
||||
"value": 2,
|
||||
"raw": "2"
|
||||
}
|
||||
"raw": "2",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclaration",
|
||||
@ -86,7 +96,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 37,
|
||||
"end": 43,
|
||||
"name": "height"
|
||||
"name": "height",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "ArrayExpression",
|
||||
@ -110,7 +121,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 47,
|
||||
"end": 50,
|
||||
"name": "obj"
|
||||
"name": "obj",
|
||||
"digest": null
|
||||
},
|
||||
"property": {
|
||||
"type": "Literal",
|
||||
@ -118,9 +130,11 @@ expression: actual
|
||||
"start": 51,
|
||||
"end": 54,
|
||||
"value": "a",
|
||||
"raw": "\"a\""
|
||||
"raw": "\"a\"",
|
||||
"digest": null
|
||||
},
|
||||
"computed": false
|
||||
"computed": false,
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -128,8 +142,10 @@ expression: actual
|
||||
"start": 57,
|
||||
"end": 58,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
}
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -137,17 +153,23 @@ expression: actual
|
||||
"start": 60,
|
||||
"end": 61,
|
||||
"value": 0,
|
||||
"raw": "0"
|
||||
"raw": "0",
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 12,
|
||||
"name": "height"
|
||||
"name": "height",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "BinaryExpression",
|
||||
@ -34,7 +35,8 @@ expression: actual
|
||||
"start": 15,
|
||||
"end": 16,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "MemberExpression",
|
||||
@ -46,25 +48,33 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 19,
|
||||
"end": 22,
|
||||
"name": "obj"
|
||||
"name": "obj",
|
||||
"digest": null
|
||||
},
|
||||
"property": {
|
||||
"type": "Identifier",
|
||||
"type": "Identifier",
|
||||
"start": 23,
|
||||
"end": 24,
|
||||
"name": "a"
|
||||
"name": "a",
|
||||
"digest": null
|
||||
},
|
||||
"computed": false
|
||||
}
|
||||
}
|
||||
"computed": false,
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 9,
|
||||
"name": "six"
|
||||
"name": "six",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "BinaryExpression",
|
||||
@ -40,7 +41,8 @@ expression: actual
|
||||
"start": 12,
|
||||
"end": 13,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -48,8 +50,10 @@ expression: actual
|
||||
"start": 16,
|
||||
"end": 17,
|
||||
"value": 2,
|
||||
"raw": "2"
|
||||
}
|
||||
"raw": "2",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -57,16 +61,22 @@ expression: actual
|
||||
"start": 20,
|
||||
"end": 21,
|
||||
"value": 3,
|
||||
"raw": "3"
|
||||
}
|
||||
}
|
||||
"raw": "3",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 10,
|
||||
"name": "five"
|
||||
"name": "five",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "BinaryExpression",
|
||||
@ -40,7 +41,8 @@ expression: actual
|
||||
"start": 13,
|
||||
"end": 14,
|
||||
"value": 3,
|
||||
"raw": "3"
|
||||
"raw": "3",
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -48,8 +50,10 @@ expression: actual
|
||||
"start": 17,
|
||||
"end": 18,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
}
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"right": {
|
||||
"type": "Literal",
|
||||
@ -57,16 +61,22 @@ expression: actual
|
||||
"start": 21,
|
||||
"end": 22,
|
||||
"value": 2,
|
||||
"raw": "2"
|
||||
}
|
||||
}
|
||||
"raw": "2",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 12,
|
||||
"name": "height"
|
||||
"name": "height",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "ArrayExpression",
|
||||
@ -38,7 +39,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 17,
|
||||
"end": 20,
|
||||
"name": "obj"
|
||||
"name": "obj",
|
||||
"digest": null
|
||||
},
|
||||
"property": {
|
||||
"type": "Literal",
|
||||
@ -46,9 +48,11 @@ expression: actual
|
||||
"start": 21,
|
||||
"end": 24,
|
||||
"value": "a",
|
||||
"raw": "\"a\""
|
||||
"raw": "\"a\"",
|
||||
"digest": null
|
||||
},
|
||||
"computed": false
|
||||
"computed": false,
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -56,17 +60,23 @@ expression: actual
|
||||
"start": 27,
|
||||
"end": 28,
|
||||
"value": 0,
|
||||
"raw": "0"
|
||||
"raw": "0",
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 9,
|
||||
"name": "obj"
|
||||
"name": "obj",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "ObjectExpression",
|
||||
@ -36,7 +37,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 14,
|
||||
"end": 15,
|
||||
"name": "a"
|
||||
"name": "a",
|
||||
"digest": null
|
||||
},
|
||||
"value": {
|
||||
"type": "Literal",
|
||||
@ -44,8 +46,10 @@ expression: actual
|
||||
"start": 17,
|
||||
"end": 18,
|
||||
"value": 1,
|
||||
"raw": "1"
|
||||
}
|
||||
"raw": "1",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "ObjectProperty",
|
||||
@ -55,7 +59,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 20,
|
||||
"end": 21,
|
||||
"name": "b"
|
||||
"name": "b",
|
||||
"digest": null
|
||||
},
|
||||
"value": {
|
||||
"type": "Literal",
|
||||
@ -63,14 +68,19 @@ expression: actual
|
||||
"start": 23,
|
||||
"end": 24,
|
||||
"value": 2,
|
||||
"raw": "2"
|
||||
}
|
||||
"raw": "2",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclaration",
|
||||
@ -86,7 +96,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 37,
|
||||
"end": 43,
|
||||
"name": "height"
|
||||
"name": "height",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "MemberExpression",
|
||||
@ -98,7 +109,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 46,
|
||||
"end": 49,
|
||||
"name": "obj"
|
||||
"name": "obj",
|
||||
"digest": null
|
||||
},
|
||||
"property": {
|
||||
"type": "Literal",
|
||||
@ -106,17 +118,23 @@ expression: actual
|
||||
"start": 50,
|
||||
"end": 53,
|
||||
"value": "a",
|
||||
"raw": "\"a\""
|
||||
"raw": "\"a\"",
|
||||
"digest": null
|
||||
},
|
||||
"computed": false
|
||||
}
|
||||
"computed": false,
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 10,
|
||||
"name": "prop"
|
||||
"name": "prop",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "MemberExpression",
|
||||
@ -37,7 +38,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 13,
|
||||
"end": 15,
|
||||
"name": "yo"
|
||||
"name": "yo",
|
||||
"digest": null
|
||||
},
|
||||
"property": {
|
||||
"type": "Literal",
|
||||
@ -45,26 +47,34 @@ expression: actual
|
||||
"start": 16,
|
||||
"end": 21,
|
||||
"value": "one",
|
||||
"raw": "\"one\""
|
||||
"raw": "\"one\"",
|
||||
"digest": null
|
||||
},
|
||||
"computed": false
|
||||
"computed": false,
|
||||
"digest": null
|
||||
},
|
||||
"property": {
|
||||
"type": "Identifier",
|
||||
"type": "Identifier",
|
||||
"start": 23,
|
||||
"end": 26,
|
||||
"name": "two"
|
||||
"name": "two",
|
||||
"digest": null
|
||||
},
|
||||
"computed": true
|
||||
}
|
||||
"computed": true,
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 9,
|
||||
"name": "pt1"
|
||||
"name": "pt1",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "MemberExpression",
|
||||
@ -32,24 +33,31 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 12,
|
||||
"end": 14,
|
||||
"name": "b1"
|
||||
"name": "b1",
|
||||
"digest": null
|
||||
},
|
||||
"property": {
|
||||
"type": "Identifier",
|
||||
"type": "Identifier",
|
||||
"start": 15,
|
||||
"end": 16,
|
||||
"name": "x"
|
||||
"name": "x",
|
||||
"digest": null
|
||||
},
|
||||
"computed": true
|
||||
}
|
||||
"computed": true,
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 10,
|
||||
"name": "prop"
|
||||
"name": "prop",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "MemberExpression",
|
||||
@ -47,51 +48,64 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 13,
|
||||
"end": 15,
|
||||
"name": "yo"
|
||||
"name": "yo",
|
||||
"digest": null
|
||||
},
|
||||
"property": {
|
||||
"type": "Identifier",
|
||||
"type": "Identifier",
|
||||
"start": 16,
|
||||
"end": 19,
|
||||
"name": "one"
|
||||
"name": "one",
|
||||
"digest": null
|
||||
},
|
||||
"computed": false
|
||||
"computed": false,
|
||||
"digest": null
|
||||
},
|
||||
"property": {
|
||||
"type": "Identifier",
|
||||
"type": "Identifier",
|
||||
"start": 20,
|
||||
"end": 23,
|
||||
"name": "two"
|
||||
"name": "two",
|
||||
"digest": null
|
||||
},
|
||||
"computed": false
|
||||
"computed": false,
|
||||
"digest": null
|
||||
},
|
||||
"property": {
|
||||
"type": "Identifier",
|
||||
"type": "Identifier",
|
||||
"start": 24,
|
||||
"end": 29,
|
||||
"name": "three"
|
||||
"name": "three",
|
||||
"digest": null
|
||||
},
|
||||
"computed": false
|
||||
"computed": false,
|
||||
"digest": null
|
||||
},
|
||||
"property": {
|
||||
"type": "Identifier",
|
||||
"type": "Identifier",
|
||||
"start": 30,
|
||||
"end": 34,
|
||||
"name": "four"
|
||||
"name": "four",
|
||||
"digest": null
|
||||
},
|
||||
"computed": false
|
||||
}
|
||||
"computed": false,
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 9,
|
||||
"name": "pt1"
|
||||
"name": "pt1",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "MemberExpression",
|
||||
@ -32,7 +33,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 12,
|
||||
"end": 14,
|
||||
"name": "b1"
|
||||
"name": "b1",
|
||||
"digest": null
|
||||
},
|
||||
"property": {
|
||||
"type": "Literal",
|
||||
@ -40,17 +42,23 @@ expression: actual
|
||||
"start": 15,
|
||||
"end": 16,
|
||||
"value": 0,
|
||||
"raw": "0"
|
||||
"raw": "0",
|
||||
"digest": null
|
||||
},
|
||||
"computed": false
|
||||
}
|
||||
"computed": false,
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 9,
|
||||
"name": "pt1"
|
||||
"name": "pt1",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "MemberExpression",
|
||||
@ -32,7 +33,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 12,
|
||||
"end": 14,
|
||||
"name": "b1"
|
||||
"name": "b1",
|
||||
"digest": null
|
||||
},
|
||||
"property": {
|
||||
"type": "Literal",
|
||||
@ -40,17 +42,23 @@ expression: actual
|
||||
"start": 15,
|
||||
"end": 21,
|
||||
"value": "zero",
|
||||
"raw": "'zero'"
|
||||
"raw": "'zero'",
|
||||
"digest": null
|
||||
},
|
||||
"computed": false
|
||||
}
|
||||
"computed": false,
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 9,
|
||||
"name": "pt1"
|
||||
"name": "pt1",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "MemberExpression",
|
||||
@ -32,24 +33,31 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 12,
|
||||
"end": 14,
|
||||
"name": "b1"
|
||||
"name": "b1",
|
||||
"digest": null
|
||||
},
|
||||
"property": {
|
||||
"type": "Identifier",
|
||||
"type": "Identifier",
|
||||
"start": 15,
|
||||
"end": 19,
|
||||
"name": "zero"
|
||||
"name": "zero",
|
||||
"digest": null
|
||||
},
|
||||
"computed": false
|
||||
}
|
||||
"computed": false,
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 8,
|
||||
"name": "sg"
|
||||
"name": "sg",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "CallExpression",
|
||||
@ -31,7 +32,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 11,
|
||||
"end": 24,
|
||||
"name": "startSketchAt"
|
||||
"name": "startSketchAt",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -39,18 +41,24 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 25,
|
||||
"end": 28,
|
||||
"name": "pos"
|
||||
"name": "pos",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
}
|
||||
"optional": false,
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 8,
|
||||
"name": "sg"
|
||||
"name": "sg",
|
||||
"digest": null
|
||||
},
|
||||
"init": {
|
||||
"type": "PipeExpression",
|
||||
@ -37,7 +38,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 11,
|
||||
"end": 24,
|
||||
"name": "startSketchAt"
|
||||
"name": "startSketchAt",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -45,10 +47,12 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 25,
|
||||
"end": 28,
|
||||
"name": "pos"
|
||||
"name": "pos",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
"optional": false,
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "CallExpression",
|
||||
@ -59,7 +63,8 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 33,
|
||||
"end": 37,
|
||||
"name": "line"
|
||||
"name": "line",
|
||||
"digest": null
|
||||
},
|
||||
"arguments": [
|
||||
{
|
||||
@ -74,7 +79,8 @@ expression: actual
|
||||
"start": 39,
|
||||
"end": 40,
|
||||
"value": 0,
|
||||
"raw": "0"
|
||||
"raw": "0",
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "UnaryExpression",
|
||||
@ -87,33 +93,44 @@ expression: actual
|
||||
"type": "Identifier",
|
||||
"start": 43,
|
||||
"end": 48,
|
||||
"name": "scale"
|
||||
}
|
||||
"name": "scale",
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
]
|
||||
],
|
||||
"digest": null
|
||||
},
|
||||
{
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution",
|
||||
"start": 51,
|
||||
"end": 52
|
||||
"end": 52,
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"optional": false
|
||||
"optional": false,
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"kind": "const"
|
||||
"kind": "const",
|
||||
"digest": null
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {},
|
||||
"start": []
|
||||
}
|
||||
"start": [],
|
||||
"digest": null
|
||||
},
|
||||
"digest": null
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ async fn inner_chamfer(
|
||||
id,
|
||||
edge_id,
|
||||
length: data.length,
|
||||
tag: tag.clone(),
|
||||
tag: Box::new(tag.clone()),
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user