Add Parser tests

This commit is contained in:
Guille Gonzalez
2026-01-02 19:36:05 +01:00
parent 64b0090f3c
commit e9657c186e
5 changed files with 2593 additions and 2553 deletions

View File

@@ -594,6 +594,11 @@ extension Math {
}
}
static func remove(latexSymbol name: String) {
supportedLatexSymbols.withValue { $0[name] = nil }
textToLatexSymbolName.withValue { $0 = nil }
}
static func operatorWithName(_ name: String, limits: Bool) -> LargeOperator {
let op = LargeOperator(limits: limits)
op.nucleus = name

View File

@@ -1136,7 +1136,12 @@ extension Math {
}
}
let table = self.buildTable(environment: env, alignment: alignment, firstList: nil, isRow: false)
let table = self.buildTable(
environment: env,
alignment: alignment,
firstList: nil,
isRow: false
)
return table
} else {
return nil
@@ -1206,7 +1211,9 @@ extension Math {
alignment = .right
default:
self.setError(
.invalidEnvironment, message: "Invalid alignment specifier: \(alignChar). Must be l, c, or r")
.invalidEnvironment,
message: "Invalid alignment specifier: \(alignChar). Must be l, c, or r"
)
return nil
}