Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 \documentclass{article} | 1 \documentclass{article} |
| 2 \usepackage{epsfig} | 2 \usepackage{epsfig} |
| 3 \usepackage{color} | 3 \usepackage{color} |
| 4 \usepackage{dart} | 4 \usepackage{dart} |
| 5 \usepackage{bnf} | 5 \usepackage{bnf} |
| 6 \usepackage{hyperref} | 6 \usepackage{hyperref} |
| 7 \usepackage{lmodern} | 7 \usepackage{lmodern} |
| 8 \usepackage[T1]{fontenc} | 8 \usepackage[T1]{fontenc} |
| 9 \newcommand{\code}[1]{{\sf #1}} | 9 \newcommand{\code}[1]{{\sf #1}} |
| 10 \title{Dart Programming Language Specification \\ | 10 \title{Dart Programming Language Specification \\ |
| (...skipping 6882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6893 \LMLabel{parts} | 6893 \LMLabel{parts} |
| 6894 | 6894 |
| 6895 \LMHash{} | 6895 \LMHash{} |
| 6896 A library may be divided into {\em parts}, each of which can be stored in a sepa rate location. A library identifies its parts by listing them via \PART{} direct ives. | 6896 A library may be divided into {\em parts}, each of which can be stored in a sepa rate location. A library identifies its parts by listing them via \PART{} direct ives. |
| 6897 | 6897 |
| 6898 \LMHash{} | 6898 \LMHash{} |
| 6899 A {\em part directive} specifies a URI where a Dart compilation unit that should be incorporated into the current library may be found. | 6899 A {\em part directive} specifies a URI where a Dart compilation unit that should be incorporated into the current library may be found. |
| 6900 | 6900 |
| 6901 \begin{grammar} | 6901 \begin{grammar} |
| 6902 {\bf partDirective:} | 6902 {\bf partDirective:} |
| 6903 metadata \PART{} uri `{\escapegrammar ;}' | 6903 metadata \PART{} uri `{\escapegrammar ;}' |
| 6904 . | 6904 . |
| 6905 | 6905 |
| 6906 {\bf partHeader:} | 6906 {\bf partHeader:} |
| 6907 metadata \PART{} \OF{} identifier (`{\escapegrammar .}' identifier)* `{\es capegrammar ;}' | 6907 metadata \PART{} \OF{} libraryDesignator `{\escapegrammar ;}' |
| 6908 . | 6908 . |
| 6909 | |
| 6910 {\bf libraryDesignator:} | |
| 6911 identifier (`{\escapegrammar .}' identifier)*; | |
| 6912 uri | |
| 6913 . | |
| 6914 | |
| 6909 {\bf partDeclaration:} | 6915 {\bf partDeclaration:} |
| 6910 partHeader topLevelDefinition* EOF | 6916 partHeader topLevelDefinition* EOF |
| 6911 . | 6917 . |
| 6912 \end{grammar} | 6918 \end{grammar} |
| 6913 | 6919 |
| 6914 \LMHash{} | 6920 \LMHash{} |
| 6915 A {\em part header} begins with \PART{} \OF{} followed by the name of the libr ary the part belongs to. A part declaration consists of a part header followed by a sequence of top-level declarations. | 6921 A {\em part header} begins with \code{\PART{} \OF{}} followed by the name or URI of the library the part belongs to. |
| 6922 A part declaration consists of a part header followed by a sequence of top-level declarations. | |
| 6916 | 6923 |
| 6917 \LMHash{} | 6924 \LMHash{} |
| 6918 Compiling a part directive of the form \code{\PART{} $s$;} causes the Dart syste m to attempt to compile the contents of the URI that is the value of $s$. The to p-level declarations at that URI are then compiled by the Dart compiler in the s cope of the current library. It is a compile-time error if the contents of the U RI are not a valid part declaration. It is a static warning if the referenced pa rt declaration $p$ names a library other than the current library as the library to which $p$ belongs. | 6925 Compiling a part directive of the form \code{\PART{} $s$;} causes the Dart syste m to attempt to compile the contents of the URI that is the value of $s$. |
| 6926 The top-level declarations at that URI are then compiled by the Dart compiler in the scope of the current library. | |
| 6927 It is a compile-time error if the contents of the URI are not a valid part decla ration. | |
| 6928 It is a static warning if the referenced part declaration $p$ has a library name or URI different from the name or URI of the current library. | |
| 6919 | 6929 |
| 6920 \LMHash{} | 6930 \LMHash{} |
| 6921 It's a compile-time error if the same library contains two part directives with the same URI. | 6931 It's a compile-time error if the same library contains two part directives with the same URI. |
| 6922 | 6932 |
| 6923 \subsection{Scripts} | 6933 \subsection{Scripts} |
| 6924 \LMLabel{scripts} | 6934 \LMLabel{scripts} |
| 6925 | 6935 |
| 6926 \LMHash{} | 6936 \LMHash{} |
| 6927 A {\em script} is a library whose exported namespace (\ref{exports}) includes a top-level member named \code{main}. It is a static warning if the static type of \code{main} is not assignable to a function type or is a function type with m ore than two required parameters. | 6937 A {\em script} is a library whose exported namespace (\ref{exports}) includes a top-level member named \code{main}. It is a static warning if the static type of \code{main} is not assignable to a function type or is a function type with m ore than two required parameters. |
| 6928 | 6938 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6980 A URI of the form \code{dart:$s$} is interpreted as a reference to a system libr ary (\ref{imports}) $s$. | 6990 A URI of the form \code{dart:$s$} is interpreted as a reference to a system libr ary (\ref{imports}) $s$. |
| 6981 | 6991 |
| 6982 \LMHash{} | 6992 \LMHash{} |
| 6983 A URI of the form \code{package:$s$} is interpreted in an implementation specifi c manner. | 6993 A URI of the form \code{package:$s$} is interpreted in an implementation specifi c manner. |
| 6984 | 6994 |
| 6985 \rationale{ | 6995 \rationale{ |
| 6986 The intent is that, during development, Dart programmers can rely on a package m anager to find elements of their program. | 6996 The intent is that, during development, Dart programmers can rely on a package m anager to find elements of their program. |
| 6987 } | 6997 } |
| 6988 | 6998 |
| 6989 \LMHash{} | 6999 \LMHash{} |
| 6990 Otherwise, any relative URI is interpreted as relative to the location of the cu rrent library. All further interpretation of URIs is implementation dependent. | 7000 Otherwise, any relative URI reference is interpreted as relative to the location of the current library. All further interpretation of URIs is implementation de pendent. |
|
eernst
2016/11/11 10:37:42
I cannot find any other occurrences of `URI refere
Lasse Reichstein Nielsen
2016/11/18 09:50:24
Because a URI cannot be relative, but a URI refere
eernst
2016/11/18 13:12:06
Wow! - acknowledged.
| |
| 6991 | 7001 |
| 6992 \commentary{This means it is dependent on the embedder.} | 7002 \commentary{This means it is dependent on the embedder.} |
| 6993 | 7003 |
| 6994 | 7004 |
| 6995 \section{Types} | 7005 \section{Types} |
| 6996 \LMLabel{types} | 7006 \LMLabel{types} |
| 6997 | 7007 |
| 6998 \LMHash{} | 7008 \LMHash{} |
| 6999 Dart supports optional typing based on interface types. | 7009 Dart supports optional typing based on interface types. |
| 7000 | 7010 |
| (...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7875 | 7885 |
| 7876 The invariant that each normative paragraph is associated with a line | 7886 The invariant that each normative paragraph is associated with a line |
| 7877 containing the text \LMHash{} should be maintained. Extra occurrences | 7887 containing the text \LMHash{} should be maintained. Extra occurrences |
| 7878 of \LMHash{} can be added if needed, e.g., in order to make | 7888 of \LMHash{} can be added if needed, e.g., in order to make |
| 7879 individual \item{}s in itemized lists addressable. Each \LM.. command | 7889 individual \item{}s in itemized lists addressable. Each \LM.. command |
| 7880 must occur on a separate line. \LMHash{} must occur immediately | 7890 must occur on a separate line. \LMHash{} must occur immediately |
| 7881 before the associated paragraph, and \LMLabel must occur immediately | 7891 before the associated paragraph, and \LMLabel must occur immediately |
| 7882 after the associated \section{}, \subsection{} etc. | 7892 after the associated \section{}, \subsection{} etc. |
| 7883 | 7893 |
| 7884 ---------------------------------------------------------------------- | 7894 ---------------------------------------------------------------------- |
| OLD | NEW |