-
Notifications
You must be signed in to change notification settings - Fork 106
Rewrite: Stepper #1742
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Rewrite: Stepper #1742
Conversation
Pull Request Test Coverage Report for Build 13645552196Details
💛 - Coveralls |
694cb98
to
d817339
Compare
VariableDeclaration: (node: StepperVariableDeclaration) => { | ||
if (node.kind === 'const') { | ||
return ( | ||
'Constant ' + | ||
node.declarations.map(ast => ast.id.name).join(', ') + | ||
' declared and substituted into the rest of block' | ||
) | ||
} else { | ||
return '...' | ||
} | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add an informative explanation for the var
and let
declarations.
const func: StepperArrowFunctionExpression = node.callee as StepperArrowFunctionExpression | ||
if (func.name && isBuiltinFunction(func.name)) { | ||
return `${func.name} runs` | ||
// @ts-expect-error func.body.type can be StepperBlockExpression | ||
} else if (func.body.type === 'BlockStatement') { | ||
if (func.params.length === 0) { | ||
return '() => {...}' + ' runs' | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should add a comment here to explain what the code below do since the name is not indicative.
const func: StepperArrowFunctionExpression = node.callee as StepperArrowFunctionExpression | |
if (func.name && isBuiltinFunction(func.name)) { | |
return `${func.name} runs` | |
// @ts-expect-error func.body.type can be StepperBlockExpression | |
} else if (func.body.type === 'BlockStatement') { | |
if (func.params.length === 0) { | |
return '() => {...}' + ' runs' | |
} | |
// Determine whether the called function is built-in or not and create explanation accordingly | |
const func: StepperArrowFunctionExpression = node.callee as StepperArrowFunctionExpression | |
if (func.name && isBuiltinFunction(func.name)) { | |
return `${func.name} runs` | |
// @ts-expect-error func.body.type can be StepperBlockExpression | |
} else if (func.body.type === 'BlockStatement') { | |
if (func.params.length === 0) { | |
return '() => {...}' + ' runs' | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this files is long and really lacking comments. However, no problem with the implementation.
24dcf50
to
e596e75
Compare
…ifier, Literal and LogicalExpressions
24b9bad
to
20cb359
Compare
Description
This PR aims to rewrite the stepper. The implementation is still in progress.
Type of change
How to test
Checklist