From 711b969477e01593f6a23a171785761e68ccc445 Mon Sep 17 00:00:00 2001 From: "Amy J. Ko" Date: Mon, 18 Sep 2023 18:11:20 -0700 Subject: [PATCH] Removed more wildcard. --- src/basis/NumberBasis.ts | 2 +- src/locale/en-US.json | 2 +- src/nodes/NumberType.ts | 2 +- src/parser/parseExpression.ts | 17 ----------------- 4 files changed, 3 insertions(+), 20 deletions(-) diff --git a/src/basis/NumberBasis.ts b/src/basis/NumberBasis.ts index 181b77148..2c7e9d8aa 100644 --- a/src/basis/NumberBasis.ts +++ b/src/basis/NumberBasis.ts @@ -420,7 +420,7 @@ export default function bootstrapNumber(locales: Locale[]) { locales, (locale) => locale.basis.Number.conversion.text ), - '#?', + '#', "''", (requestor: Expression, val: NumberValue) => new TextValue(requestor, val.toString()) diff --git a/src/locale/en-US.json b/src/locale/en-US.json index 6105fcfad..d2cf35089 100644 --- a/src/locale/en-US.json +++ b/src/locale/en-US.json @@ -1175,7 +1175,7 @@ "emotion": "curious", "doc": [ "I represent a @FunctionDefinition. I'm really helpful if you want to say what kind of function a @Bind holds! Like this:", - "\\math•ƒ (# # # #) #?: ƒ interesting(a•# b•# c•# d•#) a + b + c + d\\" + "\\math•ƒ (# # # #) #: ƒ interesting(a•# b•# c•# d•#) a + b + c + d\\" ] }, "ListType": { diff --git a/src/nodes/NumberType.ts b/src/nodes/NumberType.ts index 25a3bf6bb..75497f535 100644 --- a/src/nodes/NumberType.ts +++ b/src/nodes/NumberType.ts @@ -144,7 +144,7 @@ export default class NumberType extends BasisType { } concreteUnit(context: Context): Unit { - // If it's a concrete unit or a wildcard, just return it. + // If it's a concrete unit, just return it. if (this.unit instanceof Unit) return this.unit; // If the unit is derived, then there must be an operation for it. diff --git a/src/parser/parseExpression.ts b/src/parser/parseExpression.ts index 25429e5e4..2931e4325 100644 --- a/src/parser/parseExpression.ts +++ b/src/parser/parseExpression.ts @@ -359,23 +359,6 @@ export function parseNumber(tokens: Tokens): NumberLiteral { /** UNIT :: DIMENSION (·DIMENSION)* (/ DIMENSION (·DIMENSION*))? */ export function parseUnit(tokens: Tokens): Unit | undefined { - // Parse a wildcard unit. - if (tokens.nextIs(Sym.Conditional)) { - return new Unit( - undefined, - [ - new Dimension( - undefined, - tokens.read(Sym.Conditional), - undefined, - undefined - ), - ], - undefined, - [] - ); - } - // A unit is just a series of names, carets, numbers, and product symbols not separated by spaces. const numerator: Dimension[] = [];