Skip to content

Commit

Permalink
Removed more wildcard.
Browse files Browse the repository at this point in the history
  • Loading branch information
amyjko committed Sep 19, 2023
1 parent 545b4f6 commit 711b969
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/basis/NumberBasis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
2 changes: 1 addition & 1 deletion src/locale/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion src/nodes/NumberType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
17 changes: 0 additions & 17 deletions src/parser/parseExpression.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = [];

Expand Down

0 comments on commit 711b969

Please sign in to comment.