From 43635d3372253262cbf51e55b2ccfceae4f94682 Mon Sep 17 00:00:00 2001 From: "Lasse R.H. Nielsen" Date: Wed, 16 May 2018 19:09:52 +0000 Subject: [PATCH] Update spec on `interface`, `mixin` and `async`. Change-Id: If445e1c154fc5b99b59d96ec3338f4273ee431dc Reviewed-on: https://dart-review.googlesource.com/55282 Reviewed-by: Leaf Petersen Commit-Queue: Lasse R.H. Nielsen --- docs/language/dart.sty | 2 ++ docs/language/dartLangSpec.tex | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/language/dart.sty b/docs/language/dart.sty index 6f5a8707bf7..468a8e85039 100644 --- a/docs/language/dart.sty +++ b/docs/language/dart.sty @@ -21,7 +21,9 @@ \def\GET{\builtinId{get}} \def\IMPLEMENTS{\builtinId{implements}} \def\IMPORT{\builtinId{import}} +\def\INTERFACE{\builtinId{interface}} \def\LIBRARY{\builtinId{library}} +\def\MIXIN{\builtinId{mixin}} \def\OPERATOR{\builtinId{operator}} \def\PART{\builtinId{part}} \def\SET{\builtinId{set}} diff --git a/docs/language/dartLangSpec.tex b/docs/language/dartLangSpec.tex index 3d99fb846e1..4ad9e1d3537 100644 --- a/docs/language/dartLangSpec.tex +++ b/docs/language/dartLangSpec.tex @@ -45,6 +45,8 @@ % - Specify `call` for Dart 2 (no function type given to enclosing class). % - Clarify that an identifier reference denoting a top-level, static, or % local function evaluates to the closurization of that declaration. +% - Make `mixin` and `interface` built-in identifiers. +% - Make `async` *not* a reserved word inside async functions. % % 1.15 % - Change how language specification describes control flow. @@ -6847,8 +6849,10 @@ An {\em identifier expression} consists of a single identifier; it provides acce \GET{}; \IMPLEMENTS{}; \IMPORT{}; + \INTERFACE{}; \LIBRARY{}; \OPERATOR{}; + \MIXIN{}; \PART{}; \SET{}; \STATIC{}; @@ -6891,7 +6895,7 @@ Furthermore, types should begin with an uppercase letter (see the appendix) and } \LMHash{} -It is a compile-time error if any of the identifiers \ASYNC, \AWAIT{} or \YIELD{} is used as an identifier in a function body marked with either \ASYNC{}, \ASYNC* or \SYNC*. +It is a compile-time error if either of the identifiers \AWAIT{} or \YIELD{} is used as an identifier in a function body marked with either \ASYNC{}, \ASYNC* or \SYNC*. \rationale{ For compatibility reasons, new constructs cannot rely upon new reserved words or even built-in identifiers.