KCL: stdlib macro should now assume all functions use keywords (#7158)

This has been enforced by the parser since #6639, so there's no need for `keywords = true` in every stdlib function anymore.
This commit is contained in:
Adam Chalmers
2025-05-21 16:10:40 -05:00
committed by GitHub
parent 0ea1e9a6da
commit f5c244dbb1
29 changed files with 24 additions and 197 deletions

View File

@ -6,7 +6,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "sketch",
@ -14607,7 +14606,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "sketch",
@ -24386,7 +24384,6 @@
"summary": "Set the appearance of a solid. This only works on solids, not sketches or individual paths.",
"description": "This will work on any solid, including extruded solids, revolved solids, and shelled solids.",
"tags": [],
"keywordArguments": true,
"args": [
{
"name": "solids",
@ -32564,7 +32561,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "sketch",
@ -45567,7 +45563,6 @@
"summary": "Check a value meets some expected conditions at runtime. Program terminates with an error if conditions aren't met. If you provide multiple conditions, they will all be checked and all must be met.",
"description": "",
"tags": [],
"keywordArguments": true,
"args": [
{
"name": "actual",
@ -45768,7 +45763,6 @@
"summary": "Asserts that a value is the boolean value true.",
"description": "",
"tags": [],
"keywordArguments": true,
"args": [
{
"name": "actual",
@ -45825,7 +45819,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "sketch",
@ -55608,7 +55601,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "sketchSurfaceOrGroup",
@ -65338,7 +65330,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "sketch",
@ -70298,7 +70289,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "sketches",
@ -81575,7 +81565,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "faces",
@ -81636,7 +81625,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "edge",
@ -81689,7 +81677,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "edge",
@ -81742,7 +81729,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "edge",
@ -81795,7 +81781,6 @@
"tags": [
"solid"
],
"keywordArguments": true,
"args": [
{
"name": "solids",
@ -86639,7 +86624,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "sketch",
@ -98014,7 +97998,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "sketch",
@ -99711,7 +99694,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "sketch",
@ -101408,7 +101390,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "sketch",
@ -109583,7 +109564,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "sketches",
@ -122535,7 +122515,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "sketchSet",
@ -133795,7 +133774,6 @@
"tags": [
"solid"
],
"keywordArguments": true,
"args": [
{
"name": "solids",
@ -146667,7 +146645,6 @@
"summary": "Repeat a 2-dimensional sketch along some dimension, with a dynamic amount of distance between each repetition, some specified number of times.",
"description": "",
"tags": [],
"keywordArguments": true,
"args": [
{
"name": "sketches",
@ -156327,7 +156304,6 @@
"tags": [
"solid"
],
"keywordArguments": true,
"args": [
{
"name": "solids",
@ -165995,7 +165971,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "sketchSurfaceOrGroup",
@ -175718,7 +175693,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "profile",
@ -177420,7 +177394,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "profile",
@ -179117,7 +179090,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "profile",
@ -180814,7 +180786,6 @@
"tags": [
"transform"
],
"keywordArguments": true,
"args": [
{
"name": "objects",
@ -193843,7 +193814,6 @@
"tags": [
"transform"
],
"keywordArguments": true,
"args": [
{
"name": "objects",
@ -203641,7 +203611,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "tag",
@ -203694,7 +203663,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "tag",
@ -203757,7 +203725,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "tag",
@ -203810,7 +203777,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "tag",
@ -203863,7 +203829,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "tag",
@ -203916,7 +203881,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "tag",
@ -203979,7 +203943,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "tag",
@ -204032,7 +203995,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "tag",
@ -204085,7 +204047,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "sketchSurface",
@ -210729,7 +210690,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "planeOrSolid",
@ -216050,7 +216010,6 @@
"tags": [
"solid"
],
"keywordArguments": true,
"args": [
{
"name": "solids",
@ -222501,7 +222460,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "sketch",
@ -227460,7 +227418,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "sketches",
@ -240648,7 +240605,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "tag",
@ -240717,7 +240673,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "sketch",
@ -252116,7 +252071,6 @@
"tags": [
"transform"
],
"keywordArguments": true,
"args": [
{
"name": "objects",
@ -261931,7 +261885,6 @@
"tags": [
"solid"
],
"keywordArguments": true,
"args": [
{
"name": "solids",
@ -266779,7 +266732,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "sketch",
@ -274952,7 +274904,6 @@
"tags": [
"sketch"
],
"keywordArguments": true,
"args": [
{
"name": "sketch",

View File

@ -82,11 +82,6 @@ struct StdlibMetadata {
#[serde(default)]
feature_tree_operation: bool,
/// If true, expects keyword arguments.
/// If false, expects positional arguments.
#[serde(default)]
keywords: bool,
/// If true, the first argument is unlabeled.
/// If false, all arguments require labels.
#[serde(default)]
@ -292,12 +287,6 @@ fn do_stdlib_inner(
quote! { false }
};
let uses_keyword_arguments = if metadata.keywords {
quote! { true }
} else {
quote! { false }
};
let docs_crate = get_crate(None);
// When the user attaches this proc macro to a function with the wrong type
@ -522,10 +511,6 @@ fn do_stdlib_inner(
vec![#(#tags),*]
}
fn keyword_arguments(&self) -> bool {
#uses_keyword_arguments
}
fn args(&self, inline_subschemas: bool) -> Vec<#docs_crate::StdLibFnArg> {
let mut settings = schemars::gen::SchemaSettings::openapi3();
// We set this to false so we can recurse them later.

View File

@ -91,10 +91,6 @@ impl crate::docs::StdLibFn for SomeFn {
vec![]
}
fn keyword_arguments(&self) -> bool {
false
}
fn args(&self, inline_subschemas: bool) -> Vec<crate::docs::StdLibFnArg> {
let mut settings = schemars::gen::SchemaSettings::openapi3();
settings.inline_subschemas = inline_subschemas;

View File

@ -91,10 +91,6 @@ impl crate::docs::StdLibFn for SomeFn {
vec![]
}
fn keyword_arguments(&self) -> bool {
false
}
fn args(&self, inline_subschemas: bool) -> Vec<crate::docs::StdLibFnArg> {
let mut settings = schemars::gen::SchemaSettings::openapi3();
settings.inline_subschemas = inline_subschemas;

View File

@ -92,10 +92,6 @@ impl crate::docs::StdLibFn for Show {
vec![]
}
fn keyword_arguments(&self) -> bool {
false
}
fn args(&self, inline_subschemas: bool) -> Vec<crate::docs::StdLibFnArg> {
let mut settings = schemars::gen::SchemaSettings::openapi3();
settings.inline_subschemas = inline_subschemas;

View File

@ -92,10 +92,6 @@ impl crate::docs::StdLibFn for Show {
vec![]
}
fn keyword_arguments(&self) -> bool {
false
}
fn args(&self, inline_subschemas: bool) -> Vec<crate::docs::StdLibFnArg> {
let mut settings = schemars::gen::SchemaSettings::openapi3();
settings.inline_subschemas = inline_subschemas;

View File

@ -93,10 +93,6 @@ impl crate::docs::StdLibFn for MyFunc {
vec![]
}
fn keyword_arguments(&self) -> bool {
false
}
fn args(&self, inline_subschemas: bool) -> Vec<crate::docs::StdLibFnArg> {
let mut settings = schemars::gen::SchemaSettings::openapi3();
settings.inline_subschemas = inline_subschemas;

View File

@ -93,10 +93,6 @@ impl crate::docs::StdLibFn for LineTo {
vec![]
}
fn keyword_arguments(&self) -> bool {
false
}
fn args(&self, inline_subschemas: bool) -> Vec<crate::docs::StdLibFnArg> {
let mut settings = schemars::gen::SchemaSettings::openapi3();
settings.inline_subschemas = inline_subschemas;

View File

@ -92,10 +92,6 @@ impl crate::docs::StdLibFn for Min {
vec![]
}
fn keyword_arguments(&self) -> bool {
false
}
fn args(&self, inline_subschemas: bool) -> Vec<crate::docs::StdLibFnArg> {
let mut settings = schemars::gen::SchemaSettings::openapi3();
settings.inline_subschemas = inline_subschemas;

View File

@ -92,10 +92,6 @@ impl crate::docs::StdLibFn for Show {
vec![]
}
fn keyword_arguments(&self) -> bool {
false
}
fn args(&self, inline_subschemas: bool) -> Vec<crate::docs::StdLibFnArg> {
let mut settings = schemars::gen::SchemaSettings::openapi3();
settings.inline_subschemas = inline_subschemas;

View File

@ -92,10 +92,6 @@ impl crate::docs::StdLibFn for Import {
vec![]
}
fn keyword_arguments(&self) -> bool {
false
}
fn args(&self, inline_subschemas: bool) -> Vec<crate::docs::StdLibFnArg> {
let mut settings = schemars::gen::SchemaSettings::openapi3();
settings.inline_subschemas = inline_subschemas;

View File

@ -92,10 +92,6 @@ impl crate::docs::StdLibFn for Import {
vec![]
}
fn keyword_arguments(&self) -> bool {
false
}
fn args(&self, inline_subschemas: bool) -> Vec<crate::docs::StdLibFnArg> {
let mut settings = schemars::gen::SchemaSettings::openapi3();
settings.inline_subschemas = inline_subschemas;

View File

@ -92,10 +92,6 @@ impl crate::docs::StdLibFn for Import {
vec![]
}
fn keyword_arguments(&self) -> bool {
false
}
fn args(&self, inline_subschemas: bool) -> Vec<crate::docs::StdLibFnArg> {
let mut settings = schemars::gen::SchemaSettings::openapi3();
settings.inline_subschemas = inline_subschemas;

View File

@ -92,10 +92,6 @@ impl crate::docs::StdLibFn for Show {
vec![]
}
fn keyword_arguments(&self) -> bool {
false
}
fn args(&self, inline_subschemas: bool) -> Vec<crate::docs::StdLibFnArg> {
let mut settings = schemars::gen::SchemaSettings::openapi3();
settings.inline_subschemas = inline_subschemas;

View File

@ -91,10 +91,6 @@ impl crate::docs::StdLibFn for SomeFunction {
vec![]
}
fn keyword_arguments(&self) -> bool {
false
}
fn args(&self, inline_subschemas: bool) -> Vec<crate::docs::StdLibFnArg> {
let mut settings = schemars::gen::SchemaSettings::openapi3();
settings.inline_subschemas = inline_subschemas;

View File

@ -78,8 +78,6 @@ pub struct StdLibFnData {
pub description: String,
/// The tags of the function.
pub tags: Vec<String>,
/// If this function uses keyword arguments, or positional arguments.
pub keyword_arguments: bool,
/// The args of the function.
pub args: Vec<StdLibFnArg>,
/// The return value of the function.
@ -472,9 +470,6 @@ pub trait StdLibFn: std::fmt::Debug + Send + Sync {
/// The description of the function.
fn description(&self) -> String;
/// Does this use keyword arguments, or positional?
fn keyword_arguments(&self) -> bool;
/// The tags of the function.
fn tags(&self) -> Vec<String>;
@ -509,7 +504,6 @@ pub trait StdLibFn: std::fmt::Debug + Send + Sync {
summary: self.summary(),
description: self.description(),
tags: self.tags(),
keyword_arguments: self.keyword_arguments(),
args: self.args(false),
return_value: self.return_value(false),
unpublished: self.unpublished(),
@ -593,7 +587,7 @@ pub trait StdLibFn: std::fmt::Debug + Send + Sync {
} else if self.name() == "subtract2D" {
return Ok("subtract2d(${0:%}, tool = ${1:%})".to_string());
}
let in_keyword_fn = self.keyword_arguments();
let in_keyword_fn = true;
let mut args = Vec::new();
let mut index = 0;
for arg in self.args(true).iter() {

View File

@ -1686,31 +1686,29 @@ pub fn get_arg_maps_from_stdlib(
let combined = stdlib.combined();
for internal_fn in combined.values() {
if internal_fn.keyword_arguments() {
let arg_map: HashMap<String, String> = internal_fn
.args(false)
.into_iter()
.map(|data| {
let mut tip = "```\n".to_owned();
tip.push_str(&data.name.clone());
if !data.required {
tip.push('?');
}
if !data.type_.is_empty() {
tip.push_str(": ");
tip.push_str(&data.type_);
}
tip.push_str("\n```");
if !data.description.is_empty() {
tip.push_str("\n\n");
tip.push_str(&data.description);
}
(data.name, tip)
})
.collect();
if !arg_map.is_empty() {
result.insert(internal_fn.name(), arg_map);
}
let arg_map: HashMap<String, String> = internal_fn
.args(false)
.into_iter()
.map(|data| {
let mut tip = "```\n".to_owned();
tip.push_str(&data.name.clone());
if !data.required {
tip.push('?');
}
if !data.type_.is_empty() {
tip.push_str(": ");
tip.push_str(&data.type_);
}
tip.push_str("\n```");
if !data.description.is_empty() {
tip.push_str("\n\n");
tip.push_str(&data.description);
}
(data.name, tip)
})
.collect();
if !arg_map.is_empty() {
result.insert(internal_fn.name(), arg_map);
}
}

View File

@ -260,7 +260,6 @@ pub async fn appearance(exec_state: &mut ExecState, args: Args) -> Result<KclVal
/// ```
#[stdlib {
name = "appearance",
keywords = true,
unlabeled_first = true,
args = {
solids = { docs = "The solid(s) whose appearance is being set" },

View File

@ -49,7 +49,6 @@ pub async fn assert(_exec_state: &mut ExecState, args: Args) -> Result<KclValue,
/// ```
#[stdlib{
name = "assertIs",
keywords = true,
unlabeled_first = true,
args = {
actual = { docs = "Value to check. If this is the boolean value true, assert passes. Otherwise it fails." },
@ -75,7 +74,6 @@ async fn inner_assert_is(actual: bool, error: Option<String>, args: &Args) -> Re
/// ```
#[stdlib {
name = "assert",
keywords = true,
unlabeled_first = true,
args = {
actual = { docs = "Value to check. It will be compared with one of the comparison arguments." },

View File

@ -106,7 +106,6 @@ pub async fn union(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
#[stdlib {
name = "union",
feature_tree_operation = true,
keywords = true,
unlabeled_first = true,
args = {
solids = {docs = "The solids to union."},
@ -232,7 +231,6 @@ pub async fn intersect(exec_state: &mut ExecState, args: Args) -> Result<KclValu
#[stdlib {
name = "intersect",
feature_tree_operation = true,
keywords = true,
unlabeled_first = true,
args = {
solids = {docs = "The solids to intersect."},
@ -352,7 +350,6 @@ pub async fn subtract(exec_state: &mut ExecState, args: Args) -> Result<KclValue
#[stdlib {
name = "subtract",
feature_tree_operation = true,
keywords = true,
unlabeled_first = true,
args = {
solids = {docs = "The solids to use as the base to subtract from."},

View File

@ -53,7 +53,6 @@ pub async fn get_opposite_edge(exec_state: &mut ExecState, args: Args) -> Result
/// ```
#[stdlib {
name = "getOppositeEdge",
keywords = true,
unlabeled_first = true,
args = {
edge = { docs = "The tag of the edge you want to find the opposite edge of." },
@ -137,7 +136,6 @@ pub async fn get_next_adjacent_edge(exec_state: &mut ExecState, args: Args) -> R
/// ```
#[stdlib {
name = "getNextAdjacentEdge",
keywords = true,
unlabeled_first = true,
args = {
edge = { docs = "The tag of the edge you want to find the next adjacent edge of." },
@ -230,7 +228,6 @@ pub async fn get_previous_adjacent_edge(exec_state: &mut ExecState, args: Args)
/// ```
#[stdlib {
name = "getPreviousAdjacentEdge",
keywords = true,
unlabeled_first = true,
args = {
edge = { docs = "The tag of the edge you want to find the previous adjacent edge of." },
@ -318,7 +315,6 @@ pub async fn get_common_edge(exec_state: &mut ExecState, args: Args) -> Result<K
#[stdlib {
name = "getCommonEdge",
feature_tree_operation = false,
keywords = true,
unlabeled_first = false,
args = {
faces = { docs = "The tags of the faces you want to find the common edge between" },

View File

@ -148,7 +148,6 @@ pub async fn extrude(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
#[stdlib {
name = "extrude",
feature_tree_operation = true,
keywords = true,
unlabeled_first = true,
args = {
sketches = { docs = "Which sketch or sketches should be extruded"},

View File

@ -121,7 +121,6 @@ pub async fn loft(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
#[stdlib {
name = "loft",
feature_tree_operation = true,
keywords = true,
unlabeled_first = true,
args = {
sketches = {docs = "Which sketches to loft. Must include at least 2 sketches."},

View File

@ -578,7 +578,6 @@ pub async fn pattern_linear_2d(exec_state: &mut ExecState, args: Args) -> Result
/// ```
#[stdlib {
name = "patternLinear2d",
keywords = true,
unlabeled_first = true,
args = {
sketches = { docs = "The sketch(es) to duplicate" },
@ -742,7 +741,6 @@ pub async fn pattern_linear_3d(exec_state: &mut ExecState, args: Args) -> Result
#[stdlib {
name = "patternLinear3d",
feature_tree_operation = true,
keywords = true,
unlabeled_first = true,
args = {
solids = { docs = "The solid(s) to duplicate" },
@ -939,7 +937,6 @@ pub async fn pattern_circular_2d(exec_state: &mut ExecState, args: Args) -> Resu
/// ```
#[stdlib {
name = "patternCircular2d",
keywords = true,
unlabeled_first = true,
args = {
sketch_set = { docs = "Which sketch(es) to pattern" },
@ -1081,7 +1078,6 @@ pub async fn pattern_circular_3d(exec_state: &mut ExecState, args: Args) -> Resu
#[stdlib {
name = "patternCircular3d",
feature_tree_operation = true,
keywords = true,
unlabeled_first = true,
args = {
solids = { docs = "Which solid(s) to pattern" },

View File

@ -49,7 +49,6 @@ pub async fn segment_end(exec_state: &mut ExecState, args: Args) -> Result<KclVa
/// ```
#[stdlib {
name = "segEnd",
keywords = true,
unlabeled_first = true,
args = {
tag = { docs = "The line segment being queried by its tag"},
@ -94,7 +93,6 @@ pub async fn segment_end_x(exec_state: &mut ExecState, args: Args) -> Result<Kcl
/// ```
#[stdlib {
name = "segEndX",
keywords = true,
unlabeled_first = true,
args = {
tag = { docs = "The line segment being queried by its tag"},
@ -137,7 +135,6 @@ pub async fn segment_end_y(exec_state: &mut ExecState, args: Args) -> Result<Kcl
/// ```
#[stdlib {
name = "segEndY",
keywords = true,
unlabeled_first = true,
args = {
tag = { docs = "The line segment being queried by its tag"},
@ -191,7 +188,6 @@ pub async fn segment_start(exec_state: &mut ExecState, args: Args) -> Result<Kcl
/// ```
#[stdlib {
name = "segStart",
keywords = true,
unlabeled_first = true,
args = {
tag = { docs = "The line segment being queried by its tag"},
@ -236,7 +232,6 @@ pub async fn segment_start_x(exec_state: &mut ExecState, args: Args) -> Result<K
/// ```
#[stdlib {
name = "segStartX",
keywords = true,
unlabeled_first = true,
args = {
tag = { docs = "The line segment being queried by its tag"},
@ -279,7 +274,6 @@ pub async fn segment_start_y(exec_state: &mut ExecState, args: Args) -> Result<K
/// ```
#[stdlib {
name = "segStartY",
keywords = true,
unlabeled_first = true,
args = {
tag = { docs = "The line segment being queried by its tag"},
@ -322,7 +316,6 @@ pub async fn last_segment_x(exec_state: &mut ExecState, args: Args) -> Result<Kc
/// ```
#[stdlib {
name = "lastSegX",
keywords = true,
unlabeled_first = true,
args = {
sketch = { docs = "The sketch whose line segment is being queried"},
@ -369,7 +362,6 @@ pub async fn last_segment_y(exec_state: &mut ExecState, args: Args) -> Result<Kc
/// ```
#[stdlib {
name = "lastSegY",
keywords = true,
unlabeled_first = true,
args = {
sketch = { docs = "The sketch whose line segment is being queried"},
@ -419,7 +411,6 @@ pub async fn segment_length(exec_state: &mut ExecState, args: Args) -> Result<Kc
/// ```
#[stdlib {
name = "segLen",
keywords = true,
unlabeled_first = true,
args = {
tag = { docs = "The line segment being queried by its tag"},
@ -463,7 +454,6 @@ pub async fn segment_angle(exec_state: &mut ExecState, args: Args) -> Result<Kcl
/// ```
#[stdlib {
name = "segAng",
keywords = true,
unlabeled_first = true,
args = {
tag = { docs = "The line segment being queried by its tag"},
@ -565,7 +555,6 @@ pub async fn tangent_to_end(exec_state: &mut ExecState, args: Args) -> Result<Kc
/// ```
#[stdlib {
name = "tangentToEnd",
keywords = true,
unlabeled_first = true,
args = {
tag = { docs = "The line segment being queried by its tag"},

View File

@ -167,7 +167,6 @@ pub async fn circle_three_point(exec_state: &mut ExecState, args: Args) -> Resul
/// ```
#[stdlib {
name = "circleThreePoint",
keywords = true,
unlabeled_first = true,
args = {
sketch_surface_or_group = {docs = "Plane or surface to sketch on."},
@ -324,7 +323,6 @@ pub async fn polygon(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
/// ```
#[stdlib {
name = "polygon",
keywords = true,
unlabeled_first = true,
args = {
sketch_surface_or_group = { docs = "Plane or surface to sketch on" },

View File

@ -133,7 +133,6 @@ fn involute_curve(radius: f64, angle: f64) -> (f64, f64) {
/// ```
#[stdlib {
name = "involuteCircular",
keywords = true,
unlabeled_first = true,
args = {
sketch = { docs = "Which sketch should this path be added to?"},
@ -254,7 +253,6 @@ pub async fn line(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
/// ```
#[stdlib {
name = "line",
keywords = true,
unlabeled_first = true,
args = {
sketch = { docs = "Which sketch should this path be added to?"},
@ -426,7 +424,6 @@ pub async fn x_line(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
/// ```
#[stdlib {
name = "xLine",
keywords = true,
unlabeled_first = true,
args = {
sketch = { docs = "Which sketch should this path be added to?"},
@ -492,7 +489,6 @@ pub async fn y_line(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
/// ```
#[stdlib {
name = "yLine",
keywords = true,
unlabeled_first = true,
args = {
sketch = { docs = "Which sketch should this path be added to?"},
@ -575,7 +571,6 @@ pub async fn angled_line(exec_state: &mut ExecState, args: Args) -> Result<KclVa
/// ```
#[stdlib {
name = "angledLine",
keywords = true,
unlabeled_first = true,
args = {
sketch = { docs = "Which sketch should this path be added to?"},
@ -874,7 +869,6 @@ pub async fn angled_line_that_intersects(exec_state: &mut ExecState, args: Args)
/// ```
#[stdlib {
name = "angledLineThatIntersects",
keywords = true,
unlabeled_first = true,
args = {
sketch = { docs = "Which sketch should this path be added to?"},
@ -1152,7 +1146,6 @@ pub async fn start_sketch_on(exec_state: &mut ExecState, args: Args) -> Result<K
#[stdlib {
name = "startSketchOn",
feature_tree_operation = true,
keywords = true,
unlabeled_first = true,
args = {
plane_or_solid = { docs = "The plane or solid to sketch on"},
@ -1318,7 +1311,6 @@ pub async fn start_profile(exec_state: &mut ExecState, args: Args) -> Result<Kcl
/// ```
#[stdlib {
name = "startProfile",
keywords = true,
unlabeled_first = true,
args = {
sketch_surface = { docs = "What to start the profile on" },
@ -1461,7 +1453,6 @@ pub async fn profile_start_x(exec_state: &mut ExecState, args: Args) -> Result<K
/// ```
#[stdlib {
name = "profileStartX",
keywords = true,
unlabeled_first = true,
args = {
profile = {docs = "Profile whose start is being used"},
@ -1491,7 +1482,6 @@ pub async fn profile_start_y(exec_state: &mut ExecState, args: Args) -> Result<K
/// ```
#[stdlib {
name = "profileStartY",
keywords = true,
unlabeled_first = true,
args = {
profile = {docs = "Profile whose start is being used"},
@ -1524,7 +1514,6 @@ pub async fn profile_start(exec_state: &mut ExecState, args: Args) -> Result<Kcl
/// ```
#[stdlib {
name = "profileStart",
keywords = true,
unlabeled_first = true,
args = {
profile = {docs = "Profile whose start is being used"},
@ -1569,7 +1558,6 @@ pub async fn close(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
/// ```
#[stdlib {
name = "close",
keywords = true,
unlabeled_first = true,
args = {
sketch = { docs = "The sketch you want to close"},
@ -1679,7 +1667,6 @@ pub async fn arc(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kcl
/// ```
#[stdlib {
name = "arc",
keywords = true,
unlabeled_first = true,
args = {
sketch = { docs = "Which sketch should this path be added to?" },
@ -1922,7 +1909,6 @@ pub async fn tangential_arc(exec_state: &mut ExecState, args: Args) -> Result<Kc
/// ```
#[stdlib {
name = "tangentialArc",
keywords = true,
unlabeled_first = true,
args = {
sketch = { docs = "Which sketch should this path be added to?"},
@ -2199,7 +2185,6 @@ pub async fn bezier_curve(exec_state: &mut ExecState, args: Args) -> Result<KclV
/// ```
#[stdlib {
name = "bezierCurve",
keywords = true,
unlabeled_first = true,
args = {
sketch = { docs = "Which sketch should this path be added to?"},
@ -2321,7 +2306,6 @@ pub async fn subtract_2d(exec_state: &mut ExecState, args: Args) -> Result<KclVa
#[stdlib {
name = "subtract2d",
feature_tree_operation = true,
keywords = true,
unlabeled_first = true,
args = {
sketch = { docs = "Which sketch should this path be added to?" },

View File

@ -160,7 +160,6 @@ pub async fn sweep(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
#[stdlib {
name = "sweep",
feature_tree_operation = true,
keywords = true,
unlabeled_first = true,
args = {
sketches = { docs = "The sketch or set of sketches that should be swept in space" },

View File

@ -147,7 +147,6 @@ pub async fn scale(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
#[stdlib {
name = "scale",
feature_tree_operation = false,
keywords = true,
unlabeled_first = true,
args = {
objects = {docs = "The solid, sketch, or set of solids or sketches to scale."},
@ -378,7 +377,6 @@ pub async fn translate(exec_state: &mut ExecState, args: Args) -> Result<KclValu
#[stdlib {
name = "translate",
feature_tree_operation = false,
keywords = true,
unlabeled_first = true,
args = {
objects = {docs = "The solid, sketch, or set of solids or sketches to move."},
@ -782,7 +780,6 @@ pub async fn rotate(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
#[stdlib {
name = "rotate",
feature_tree_operation = false,
keywords = true,
unlabeled_first = true,
args = {
objects = {docs = "The solid, sketch, or set of solids or sketches to rotate."},