Add sketch on extrude face functionality
This commit is contained in:
@ -199,6 +199,23 @@ function makeArguments(
|
||||
expression,
|
||||
])
|
||||
}
|
||||
if (
|
||||
argumentToken.token.type === 'brace' &&
|
||||
argumentToken.token.value === '{'
|
||||
) {
|
||||
const { expression, lastIndex } = makeObjectExpression(
|
||||
tokens,
|
||||
argumentToken.index
|
||||
)
|
||||
const nextCommarOrBraceTokenIndex = nextMeaningfulToken(
|
||||
tokens,
|
||||
lastIndex
|
||||
).index
|
||||
return makeArguments(tokens, nextCommarOrBraceTokenIndex, [
|
||||
...previousArgs,
|
||||
expression,
|
||||
])
|
||||
}
|
||||
if (!isIdentifierOrLiteral) {
|
||||
const { expression, lastIndex } = makeBinaryExpression(tokens, index)
|
||||
return makeArguments(tokens, lastIndex, [...previousArgs, expression])
|
||||
@ -217,6 +234,25 @@ function makeArguments(
|
||||
value,
|
||||
])
|
||||
}
|
||||
|
||||
if (
|
||||
argumentToken.token.type === 'word' &&
|
||||
nextBraceOrCommaToken.token.type === 'brace' &&
|
||||
nextBraceOrCommaToken.token.value === '('
|
||||
) {
|
||||
const { expression, lastIndex } = makeCallExpression(
|
||||
tokens,
|
||||
argumentToken.index
|
||||
)
|
||||
const nextCommarOrBraceTokenIndex = nextMeaningfulToken(
|
||||
tokens,
|
||||
lastIndex
|
||||
).index
|
||||
return makeArguments(tokens, nextCommarOrBraceTokenIndex, [
|
||||
...previousArgs,
|
||||
expression,
|
||||
])
|
||||
}
|
||||
if (argumentToken.token.type === 'word') {
|
||||
const identifier = makeIdentifier(tokens, argumentToken.index)
|
||||
return makeArguments(tokens, nextBraceOrCommaToken.index, [
|
||||
|
Reference in New Issue
Block a user