OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013, the Dart project authors. | 2 * Copyright (c) 2013, the Dart project authors. |
3 * | 3 * |
4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except | 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except |
5 * in compliance with the License. You may obtain a copy of the License at | 5 * in compliance with the License. You may obtain a copy of the License at |
6 * | 6 * |
7 * http://www.eclipse.org/legal/epl-v10.html | 7 * http://www.eclipse.org/legal/epl-v10.html |
8 * | 8 * |
9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License | 9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License |
10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express | 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 formatterToken = name.getEndToken().getNext(); | 506 formatterToken = name.getEndToken().getNext(); |
507 // parse arguments | 507 // parse arguments |
508 List<AngularFormatterArgument> arguments = Lists.newArrayList(); | 508 List<AngularFormatterArgument> arguments = Lists.newArrayList(); |
509 while (formatterToken.getType() != TokenType.EOF) { | 509 while (formatterToken.getType() != TokenType.EOF) { |
510 // skip ":" | 510 // skip ":" |
511 Token colonToken = formatterToken; | 511 Token colonToken = formatterToken; |
512 if (colonToken.getType() == TokenType.COLON) { | 512 if (colonToken.getType() == TokenType.COLON) { |
513 formatterToken = formatterToken.getNext(); | 513 formatterToken = formatterToken.getNext(); |
514 } else { | 514 } else { |
515 reportErrorForToken(AngularCode.MISSING_FORMATTER_COLON, colonToken); | 515 reportErrorForToken(AngularCode.MISSING_FORMATTER_COLON, colonToken); |
| 516 break; |
516 } | 517 } |
517 // parse argument | 518 // parse argument |
518 Expression argument = parseDartExpressionInToken(formatterToken); | 519 Expression argument = parseDartExpressionInToken(formatterToken); |
519 arguments.add(new AngularFormatterArgument(colonToken, argument)); | 520 arguments.add(new AngularFormatterArgument(colonToken, argument)); |
520 // next token | 521 // next token |
521 formatterToken = argument.getEndToken().getNext(); | 522 formatterToken = argument.getEndToken().getNext(); |
522 } | 523 } |
523 formatters.add(new AngularFormatterNode(barToken, name, arguments)); | 524 formatters.add(new AngularFormatterNode(barToken, name, arguments)); |
524 } | 525 } |
525 // done | 526 // done |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
856 public Void visitXmlTagNode(XmlTagNode node) { | 857 public Void visitXmlTagNode(XmlTagNode node) { |
857 NgModelProcessor directive = NgModelProcessor.INSTANCE; | 858 NgModelProcessor directive = NgModelProcessor.INSTANCE; |
858 if (directive.canApply(node)) { | 859 if (directive.canApply(node)) { |
859 directive.applyTopDeclarations(AngularHtmlUnitResolver.this, node); | 860 directive.applyTopDeclarations(AngularHtmlUnitResolver.this, node); |
860 } | 861 } |
861 return super.visitXmlTagNode(node); | 862 return super.visitXmlTagNode(node); |
862 } | 863 } |
863 }); | 864 }); |
864 } | 865 } |
865 } | 866 } |
OLD | NEW |