-
-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
62137ef
commit 62b0673
Showing
199 changed files
with
5,579 additions
and
1,130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { ValueConverter, Conditional, AccessMember, AccessKeyed, CallMember, BindingBehavior, Binary } from 'aurelia-binding'; | ||
export declare type Chain = any; | ||
export declare type Assign = any; | ||
export declare type AccessThis = any; | ||
export declare type AccessScope = any; | ||
export declare type CallScope = any; | ||
export declare type CallFunction = any; | ||
export declare type PrefixNot = any; | ||
export declare type LiteralPrimitive = any; | ||
export declare type LiteralArray = any; | ||
export declare type LiteralObject = any; | ||
export declare type LiteralString = any; | ||
export declare class ExpressionVisitor { | ||
visitChain(chain: Chain): void; | ||
visitBindingBehavior(behavior: BindingBehavior): void; | ||
visitValueConverter(converter: ValueConverter): void; | ||
visitAssign(assign: Assign): void; | ||
visitConditional(conditional: Conditional): void; | ||
visitAccessThis(access: AccessThis): void; | ||
visitAccessScope(access: AccessScope): void; | ||
visitAccessMember(access: AccessMember): void; | ||
visitAccessKeyed(access: AccessKeyed): void; | ||
visitCallScope(call: CallScope): void; | ||
visitCallFunction(call: CallFunction): void; | ||
visitCallMember(call: CallMember): void; | ||
visitPrefix(prefix: PrefixNot): void; | ||
visitBinary(binary: Binary): void; | ||
visitLiteralPrimitive(literal: LiteralPrimitive): void; | ||
visitLiteralArray(literal: LiteralArray): void; | ||
visitLiteralObject(literal: LiteralObject): void; | ||
visitLiteralString(literal: LiteralString): void; | ||
private visitArgs(args); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
define(["require", "exports"], function (require, exports) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
// tslint:disable:no-empty | ||
var ExpressionVisitor = (function () { | ||
function ExpressionVisitor() { | ||
} | ||
ExpressionVisitor.prototype.visitChain = function (chain) { | ||
this.visitArgs(chain.expressions); | ||
}; | ||
ExpressionVisitor.prototype.visitBindingBehavior = function (behavior) { | ||
behavior.expression.accept(this); | ||
this.visitArgs(behavior.args); | ||
}; | ||
ExpressionVisitor.prototype.visitValueConverter = function (converter) { | ||
converter.expression.accept(this); | ||
this.visitArgs(converter.args); | ||
}; | ||
ExpressionVisitor.prototype.visitAssign = function (assign) { | ||
assign.target.accept(this); | ||
assign.value.accept(this); | ||
}; | ||
ExpressionVisitor.prototype.visitConditional = function (conditional) { | ||
conditional.condition.accept(this); | ||
conditional.yes.accept(this); | ||
conditional.no.accept(this); | ||
}; | ||
ExpressionVisitor.prototype.visitAccessThis = function (access) { | ||
access.ancestor = access.ancestor; | ||
}; | ||
ExpressionVisitor.prototype.visitAccessScope = function (access) { | ||
access.name = access.name; | ||
}; | ||
ExpressionVisitor.prototype.visitAccessMember = function (access) { | ||
access.object.accept(this); | ||
}; | ||
ExpressionVisitor.prototype.visitAccessKeyed = function (access) { | ||
access.object.accept(this); | ||
access.key.accept(this); | ||
}; | ||
ExpressionVisitor.prototype.visitCallScope = function (call) { | ||
this.visitArgs(call.args); | ||
}; | ||
ExpressionVisitor.prototype.visitCallFunction = function (call) { | ||
call.func.accept(this); | ||
this.visitArgs(call.args); | ||
}; | ||
ExpressionVisitor.prototype.visitCallMember = function (call) { | ||
call.object.accept(this); | ||
this.visitArgs(call.args); | ||
}; | ||
ExpressionVisitor.prototype.visitPrefix = function (prefix) { | ||
prefix.expression.accept(this); | ||
}; | ||
ExpressionVisitor.prototype.visitBinary = function (binary) { | ||
binary.left.accept(this); | ||
binary.right.accept(this); | ||
}; | ||
ExpressionVisitor.prototype.visitLiteralPrimitive = function (literal) { | ||
literal.value = literal.value; | ||
}; | ||
ExpressionVisitor.prototype.visitLiteralArray = function (literal) { | ||
this.visitArgs(literal.elements); | ||
}; | ||
ExpressionVisitor.prototype.visitLiteralObject = function (literal) { | ||
this.visitArgs(literal.values); | ||
}; | ||
ExpressionVisitor.prototype.visitLiteralString = function (literal) { | ||
literal.value = literal.value; | ||
}; | ||
ExpressionVisitor.prototype.visitArgs = function (args) { | ||
for (var i = 0; i < args.length; i++) { | ||
args[i].accept(this); | ||
} | ||
}; | ||
return ExpressionVisitor; | ||
}()); | ||
exports.ExpressionVisitor = ExpressionVisitor; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Expression, AccessScope } from 'aurelia-binding'; | ||
import { BindingLanguage } from 'aurelia-templating'; | ||
import { ExpressionVisitor } from './expression-visitor'; | ||
export declare class ValidationMessageParser { | ||
private bindinqLanguage; | ||
static inject: typeof BindingLanguage[]; | ||
private emptyStringExpression; | ||
private nullExpression; | ||
private undefinedExpression; | ||
private cache; | ||
constructor(bindinqLanguage: BindingLanguage); | ||
parse(message: string): Expression; | ||
private coalesce(part); | ||
} | ||
export declare class MessageExpressionValidator extends ExpressionVisitor { | ||
private originalMessage; | ||
static validate(expression: Expression, originalMessage: string): void; | ||
constructor(originalMessage: string); | ||
visitAccessScope(access: AccessScope): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.