Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions js/equations_parser_wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,7 @@ class Parsec {
try {
this._validateEquationInput(equation)

console.log(`🧮 JS: Evaluating equation: "${equation}"`)

const jsonResult = this.module.eval_equation(equation)
console.log(`🧮 JS: Raw result from C++: ${jsonResult}`)

const parsedResult = JSON.parse(jsonResult)

Expand All @@ -128,13 +125,10 @@ class Parsec {
throw new Error(parsedResult.error)
}

console.log(`✅ JS: Raw result from C++: ${parsedResult.val} (type: ${parsedResult.type})`)
const convertedValue = this._convert(parsedResult)
console.log(`✅ JS: Converted result: ${convertedValue} (type: ${parsedResult.type})`)

return convertedValue
} catch (error) {
console.error('❌ Error in eval:', error.message || error)
throw error
}
}
Expand Down Expand Up @@ -179,10 +173,7 @@ class Parsec {
try {
this._validateEquationInput(equation)

console.log(`🧮 JS RAW: Evaluating equation: "${equation}"`)

const jsonResult = this.module.eval_equation(equation)
console.log(`🧮 JS RAW: Raw result from C++: ${jsonResult}`)

// Parse JSON only to check for errors and throw them as exceptions
const parsedResult = JSON.parse(jsonResult)
Expand All @@ -192,8 +183,6 @@ class Parsec {
throw new Error(parsedResult.error)
}

console.log(`✅ JS RAW: Returning raw JSON result: ${jsonResult}`)

// Return the raw JSON string from C++ for platform consistency
return jsonResult
} catch (error) {
Expand Down