Chromium Code Reviews| Index: docs/language/dartLangSpec.tex |
| diff --git a/docs/language/dartLangSpec.tex b/docs/language/dartLangSpec.tex |
| index efd9b0dd6592727750510d4cbd981888e8069990..0dbc8d391e732b4101aa74256b14b2730c42a9ab 100644 |
| --- a/docs/language/dartLangSpec.tex |
| +++ b/docs/language/dartLangSpec.tex |
| @@ -734,7 +734,7 @@ Optional parameters may be specified and provided with default values. |
| \begin{grammar} |
| {\bf defaultFormalParameter:} |
| - normalFormalParameter ('=' expression)? |
| + normalFormalParameter (`=' expression)? |
| . |
| {\bf defaultNamedParameter:} |
| @@ -835,10 +835,10 @@ metadata \ABSTRACT{}? \CLASS{} mixinApplicationClass |
| constructorSignature (redirection $|$ initializers)?; |
| \EXTERNAL{} constantConstructorSignature; |
| \EXTERNAL{} constructorSignature; |
| - ((\EXTERNAL{} \STATIC{} ?))? getterSignature; |
| - ((\EXTERNAL{} \STATIC{}?))? setterSignature; |
| + (\EXTERNAL{} \STATIC{}?)? getterSignature; |
| + (\EXTERNAL{} \STATIC{}?)? setterSignature; |
| \EXTERNAL{}? operatorSignature; |
| - ((\EXTERNAL{} \STATIC{}?))? functionSignature; |
| + (\EXTERNAL{} \STATIC{}?)? functionSignature; |
| \STATIC{} (\FINAL{} $|$ \CONST{}) type? staticFinalDeclarationList; |
| % \CONST{} type? staticFinalDeclarationList; |
| \FINAL{} type? initializedIdentifierList; |
| @@ -1595,7 +1595,7 @@ However, the following constructors are disallowed: |
| \CLASS{} D \{ |
| \FINAL{} w; |
| \CONST{} D.makeList(p): w = \CONST{} [p]; // compile-time error |
| - \CONST{} D.makeMap(p): w = \CONST{} \{``help'': q\}; // compile-time error |
| + \CONST{} D.makeMap(p): w = \CONST{} \{"help": q\}; // compile-time error |
|
gbracha
2015/12/21 19:06:53
No, this comes out wrong/ Some of these changes a
Patrice Chalin
2015/12/22 05:21:06
I guess that you know that in several other dartCo
|
| \CONST{} D.makeC(p): w = \CONST{} C(p, 12); // compile-time error |
| \} |
| \end{dartCode} |
| @@ -2533,7 +2533,7 @@ Invoking a method on \NULL{} yields a \code{NoSuchMethodError} unless the metho |
| \LMHash{} |
| The static type of \NULL{} is $\bot$. |
| -\rationale{The decision to use $\bot$ instead of \code{Null} allows \NULL{} to be be assigned everywhere without complaint by the static checker. |
| +\rationale{The decision to use $\bot$ instead of \code{Null} allows \NULL{} to be assigned everywhere without complaint by the static checker. |
| } |
| @@ -2549,19 +2549,19 @@ A {\em numeric literal} is either a decimal or hexadecimal integer of arbitrary |
| . |
| {\bf NUMBER:} DIGIT+ (`{\escapegrammar.}' DIGIT+)? EXPONENT?; |
| - {`\escapegrammar .}' DIGIT+ EXPONENT? |
| + `{\escapegrammar .}' DIGIT+ EXPONENT? |
| . |
| {\bf EXPONENT:} |
| - (`e' $|$ `E') ('+' $|$ `-`)? DIGIT+ |
| + (`e' $|$ `E') (`+' $|$ `-')? DIGIT+ |
| . |
| {\bf HEX\_NUMBER:}`0x' HEX\_DIGIT+; |
| `0X' HEX\_DIGIT+ |
| . |
| - {\bf HEX\_DIGIT:}`a'{\escapegrammar ..}'f'; |
| - `A'{\escapegrammar ..}'F'; |
| + {\bf HEX\_DIGIT:}`a'{\escapegrammar ..}`f'; |
| + `A'{\escapegrammar ..}`F'; |
| DIGIT |
| . |
| \end{grammar} |
| @@ -2846,7 +2846,7 @@ A {\em symbol literal} denotes the name of a declaration in a Dart program. |
| \end{grammar} |
| \LMHash{} |
| -A symbol literal \code{\#id} where \code{id} does not begin with an underscore ('\code{\_}') is equivalent to the expression \code{\CONST{} Symbol('id')}. |
| +A symbol literal \code{\#id} where \code{id} does not begin with an underscore (`\code{\_}') is equivalent to the expression \code{\CONST{} Symbol('id')}. |
| \LMHash{} |
| A symbol literal \code{\#\_id} evaluates to the object that would be returned by the call \code{mirror.getPrivateSymbol('id')} where mirror is an instance of the class \code{LibraryMirror} defined in the library \code{dart:mirrors}, reflecting the current library. |
| @@ -3482,7 +3482,7 @@ To see how such situations might arise, consider the following examples: |
| \end{dartCode} |
| \commentary{ |
| -Due to the rules governing constant constructors, evaluating the constructor \code{A()} with the argument \code{''x''} or the argument \code{\CONST{} IntPair(1, 2)} would cause it to throw an exception, resulting in a compile-time error. |
| +Due to the rules governing constant constructors, evaluating the constructor \code{A()} with the argument \code{"x"} or the argument \code{\CONST{} IntPair(1, 2)} would cause it to throw an exception, resulting in a compile-time error. |
| } |
| @@ -4424,7 +4424,7 @@ If $d$ is the declaration of a library variable, top level getter or top level s |
| Otherwise, if $d$ is the declaration of a static variable, static getter or static setter in class $C$, then the assignment is equivalent to the assignment \code{$C.v$ = $e$}. |
| \LMHash{} |
| -Otherwise, If $a$ occurs inside a top level or static function (be it function, method, getter, or setter) or variable initializer, evaluation of $a$ causes $e$ to be evaluated, after which a \code{NoSuchMethodError} is thrown. |
| +Otherwise, if $a$ occurs inside a top level or static function (be it function, method, getter, or setter) or variable initializer, evaluation of $a$ causes $e$ to be evaluated, after which a \code{NoSuchMethodError} is thrown. |
| \LMHash{} |
| Otherwise, the assignment is equivalent to the assignment \code{ \THIS{}.$v$ = $e$}. |
| @@ -5268,7 +5268,7 @@ Let $d$ be the innermost declaration in the enclosing lexical scope whose name i |
| %If no such member exists, let $d$ be the declaration of the static member name $id$ declared in a superclass of the current class, if it exists. |
| \begin{itemize} |
| -\item if $d$ is a prefix $p$, a compile-time error occurs unless the token immediately following $d$ is \code{'.'}. |
| +\item if $d$ is a prefix $p$, a compile-time error occurs unless the token immediately following $d$ is \code{`.'}. |
| \item If $d$ is a class or type alias $T$, the value of $e$ is an instance of class \code{Type} (or a subclass thereof) reifying $T$. |
| \item If $d$ is a type parameter $T$, then the value of $e$ is the value of the actual type argument corresponding to $T$ that was passed to the generative constructor that created the current binding of \THIS{}. If, however, $e$ occurs inside a static member, a compile-time error occurs. |
| @@ -5472,7 +5472,7 @@ A {\em variable declaration statement }declares a new local variable. |
| \begin{grammar} |
| {\bf localVariableDeclaration:} |
| - initializedVariableDeclaration {\escapegrammar';'} |
| + initializedVariableDeclaration `{\escapegrammar ;}' |
| . |
| \end{grammar} |
| @@ -7008,11 +7008,11 @@ Static type annotations are used in variable declarations (\ref{variables}) (inc |
| . |
| {\bf typeArguments:} |
| - '<' typeList '>' |
| + `<' typeList `>' |
| . |
| {\bf typeList:} |
| - type (',' type)* |
| + type (`,' type)* |
| . |
| \end{grammar} |
| @@ -7117,7 +7117,7 @@ main() \{ |
| \end{dartCode} |
| \commentary{ |
| -Since $i$ is not a type, a static warning will be issue at the declaration of $j$. However, the program can be executed without incident in production mode because he undeclared type $i$ is treated as \DYNAMIC{}. However, in checked mode, the implicit subtype test at the assignment will trigger an error at runtime. |
| +Since $i$ is not a type, a static warning will be issue at the declaration of $j$. However, the program can be executed without incident in production mode because the undeclared type $i$ is treated as \DYNAMIC{}. However, in checked mode, the implicit subtype test at the assignment will trigger an error at runtime. |
| } |
| @@ -7476,7 +7476,7 @@ Type objects reify the runtime types of instances. No instance ever has type \VO |
| A {\em parameterized type} is an invocation of a generic type declaration. |
| \LMHash{} |
| -Let $T$ be a parameterized type $G<S_1, \ldots, S_n>$. If $G$ is not a generic type, the type arguments $S_i$, $1 \le i \le n$ are discarded. If $G$ has $m \ne n$ type parameters, $T$ is treated as as a parameterized type with $m$ arguments, all of which are \DYNAMIC{}. |
| +Let $T$ be a parameterized type $G<S_1, \ldots, S_n>$. If $G$ is not a generic type, the type arguments $S_i$, $1 \le i \le n$ are discarded. If $G$ has $m \ne n$ type parameters, $T$ is treated as a parameterized type with $m$ arguments, all of which are \DYNAMIC{}. |
| \commentary{In short, any arity mismatch results in all type arguments being dropped, and replaced with the correct number of type arguments, all set to \DYNAMIC{}. Of course, a static warning will be issued. |
| } |