Skip to content

Commit

Permalink
Factor out Forgiving parser from template engine.
Browse files Browse the repository at this point in the history
We want to experiment with an Unforgiving parser which our template
engine can leverage. To enable better side-by-side comparison, we can
factor out the current parser from our template engine and give it the
same `parse` interface.
  • Loading branch information
theengineear committed Dec 7, 2024
1 parent c03cf79 commit d7b3a48
Show file tree
Hide file tree
Showing 3 changed files with 414 additions and 315 deletions.
92 changes: 46 additions & 46 deletions ts/x-element.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,55 +147,55 @@ export default class XElement extends HTMLElement {
static template(html: Function, engine: {
[key: string]: Function;
}): (properties: object, host: HTMLElement) => any;
static "__#2@#analyzeConstructor"(constructor: any): void;
static "__#2@#validateProperties"(constructor: any, properties: any, entries: any): void;
static "__#2@#validateProperty"(constructor: any, key: any, property: any): void;
static "__#2@#validatePropertyAttribute"(constructor: any, key: any, property: any, attribute: any): void;
static "__#2@#propertyIsCyclic"(property: any, inputMap: any, seen?: Set<any>): boolean;
static "__#2@#validateListeners"(constructor: any, listeners: any, entries: any): void;
static "__#2@#mutateProperty"(constructor: any, propertyMap: any, key: any, property: any): void;
static "__#2@#addPropertyInitial"(constructor: any, property: any): void;
static "__#2@#addPropertyDefault"(constructor: any, property: any): void;
static "__#2@#addPropertySync"(constructor: any, property: any): void;
static "__#2@#addPropertyReflect"(constructor: any, property: any): void;
static "__#2@#addPropertyCompute"(constructor: any, property: any): void;
static "__#2@#addPropertyObserve"(constructor: any, property: any): void;
static "__#2@#constructHost"(host: any): void;
static "__#2@#createInternal"(host: any): any;
static "__#2@#createProperties"(host: any): any;
static "__#2@#connectHost"(host: any): void;
static "__#2@#disconnectHost"(host: any): void;
static "__#2@#initializeHost"(host: any): boolean;
static "__#2@#upgradeOwnProperties"(host: any): void;
static "__#2@#getPreUpgradePropertyValue"(host: any, property: any): {
static "__#3@#analyzeConstructor"(constructor: any): void;
static "__#3@#validateProperties"(constructor: any, properties: any, entries: any): void;
static "__#3@#validateProperty"(constructor: any, key: any, property: any): void;
static "__#3@#validatePropertyAttribute"(constructor: any, key: any, property: any, attribute: any): void;
static "__#3@#propertyIsCyclic"(property: any, inputMap: any, seen?: Set<any>): boolean;
static "__#3@#validateListeners"(constructor: any, listeners: any, entries: any): void;
static "__#3@#mutateProperty"(constructor: any, propertyMap: any, key: any, property: any): void;
static "__#3@#addPropertyInitial"(constructor: any, property: any): void;
static "__#3@#addPropertyDefault"(constructor: any, property: any): void;
static "__#3@#addPropertySync"(constructor: any, property: any): void;
static "__#3@#addPropertyReflect"(constructor: any, property: any): void;
static "__#3@#addPropertyCompute"(constructor: any, property: any): void;
static "__#3@#addPropertyObserve"(constructor: any, property: any): void;
static "__#3@#constructHost"(host: any): void;
static "__#3@#createInternal"(host: any): any;
static "__#3@#createProperties"(host: any): any;
static "__#3@#connectHost"(host: any): void;
static "__#3@#disconnectHost"(host: any): void;
static "__#3@#initializeHost"(host: any): boolean;
static "__#3@#upgradeOwnProperties"(host: any): void;
static "__#3@#getPreUpgradePropertyValue"(host: any, property: any): {
value: any;
found: boolean;
};
static "__#2@#initializeProperty"(host: any, property: any): void;
static "__#2@#addListener"(host: any, element: any, type: any, callback: any, options: any): void;
static "__#2@#addListeners"(host: any): void;
static "__#2@#removeListener"(host: any, element: any, type: any, callback: any, options: any): void;
static "__#2@#removeListeners"(host: any): void;
static "__#2@#getListener"(host: any, listener: any): any;
static "__#2@#updateHost"(host: any): void;
static "__#2@#toPathString"(host: any): string;
static "__#2@#invalidateProperty"(host: any, property: any): Promise<void>;
static "__#2@#getPropertyValue"(host: any, property: any): any;
static "__#2@#validatePropertyValue"(host: any, property: any, value: any): void;
static "__#2@#setPropertyValue"(host: any, property: any, value: any): void;
static "__#2@#serializeProperty"(host: any, property: any, value: any): any;
static "__#2@#deserializeProperty"(host: any, property: any, value: any): any;
static "__#2@#propertyHasAttribute"(property: any): boolean;
static "__#2@#getTypeName"(value: any): any;
static "__#2@#notNullish"(value: any): boolean;
static "__#2@#typeIsWrong"(type: any, value: any): boolean;
static "__#2@#camelToKebab"(camel: any): any;
static "__#2@#constructors": WeakMap<WeakKey, any>;
static "__#2@#hosts": WeakMap<WeakKey, any>;
static "__#2@#propertyKeys": Set<string>;
static "__#2@#serializableTypes": Set<StringConstructor | BooleanConstructor | NumberConstructor>;
static "__#2@#caseMap": Map<any, any>;
static "__#2@#prototypeInterface": Set<string>;
static "__#3@#initializeProperty"(host: any, property: any): void;
static "__#3@#addListener"(host: any, element: any, type: any, callback: any, options: any): void;
static "__#3@#addListeners"(host: any): void;
static "__#3@#removeListener"(host: any, element: any, type: any, callback: any, options: any): void;
static "__#3@#removeListeners"(host: any): void;
static "__#3@#getListener"(host: any, listener: any): any;
static "__#3@#updateHost"(host: any): void;
static "__#3@#toPathString"(host: any): string;
static "__#3@#invalidateProperty"(host: any, property: any): Promise<void>;
static "__#3@#getPropertyValue"(host: any, property: any): any;
static "__#3@#validatePropertyValue"(host: any, property: any, value: any): void;
static "__#3@#setPropertyValue"(host: any, property: any, value: any): void;
static "__#3@#serializeProperty"(host: any, property: any, value: any): any;
static "__#3@#deserializeProperty"(host: any, property: any, value: any): any;
static "__#3@#propertyHasAttribute"(property: any): boolean;
static "__#3@#getTypeName"(value: any): any;
static "__#3@#notNullish"(value: any): boolean;
static "__#3@#typeIsWrong"(type: any, value: any): boolean;
static "__#3@#camelToKebab"(camel: any): any;
static "__#3@#constructors": WeakMap<WeakKey, any>;
static "__#3@#hosts": WeakMap<WeakKey, any>;
static "__#3@#propertyKeys": Set<string>;
static "__#3@#serializableTypes": Set<StringConstructor | BooleanConstructor | NumberConstructor>;
static "__#3@#caseMap": Map<any, any>;
static "__#3@#prototypeInterface": Set<string>;
/**
* Extends HTMLElement.prototype.connectedCallback.
*/
Expand Down
2 changes: 1 addition & 1 deletion ts/x-template.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d7b3a48

Please sign in to comment.