Skip to content

Commit

Permalink
fix: fix code generation regression
Browse files Browse the repository at this point in the history
  • Loading branch information
mgreminger committed Jan 6, 2025
1 parent e60bb21 commit 014090a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/parser/LatexToSympy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -679,11 +679,13 @@ export class LatexToSympy extends LatexParserVisitor<string | Statement | UnitBl
}
if (isCodeFunctionQuery) {

const codeFunctionName = codeFunction.sympy.match(/,(\S*)\)/)[1];

const codeFunctionRawQuery: CodeFunctionRawQuery = {
type: "query",
unitlessSubExpressions: [],
implicitParams: [],
params: [codeFunction.sympy,],
params: [codeFunctionName,],
functions: [],
arguments: [],
localSubs: [],
Expand All @@ -697,7 +699,7 @@ export class LatexToSympy extends LatexParserVisitor<string | Statement | UnitBl
isScatterXValuesQueryStatement: false,
isScatterYValuesQueryStatement: false,
isFromPlotCell: false,
sympy: codeFunction.sympy,
sympy: codeFunctionName,
isRange: false,
isDataTableQuery: false,
isCodeFunctionQuery: false,
Expand All @@ -709,7 +711,7 @@ export class LatexToSympy extends LatexParserVisitor<string | Statement | UnitBl
isCodeFunctionQuery: true,
codeFunctionRawQuery: codeFunctionRawQuery,
generateCode: false,
functionName: codeFunction.sympy,
functionName: codeFunctionName,
parameterNames: codeFunction.functionParameters,
parameterValues: parameterValues,
parameterUnits: parameterUnits,
Expand Down

0 comments on commit 014090a

Please sign in to comment.