aboutsummaryrefslogtreecommitdiffhomepage
path: root/site
diff options
context:
space:
mode:
authorGravatar laurentlb <laurentlb@google.com>2018-07-03 12:38:06 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-07-03 12:39:18 -0700
commitb0c8619ac72dae04537d02b70d7665a0361f2798 (patch)
treebf38eb05a44758bdf5b9a395282041ab8c0f92a1 /site
parentb6da3b1072f5dbcca2d6a45e6f5349f2dc6491d8 (diff)
Skylark spec: -x is not an Operand, but a UnaryExpr
PiperOrigin-RevId: 203167019
Diffstat (limited to 'site')
-rw-r--r--site/docs/skylark/spec.md13
1 files changed, 6 insertions, 7 deletions
diff --git a/site/docs/skylark/spec.md b/site/docs/skylark/spec.md
index ecd84a6427..13cad173ea 100644
--- a/site/docs/skylark/spec.md
+++ b/site/docs/skylark/spec.md
@@ -12,7 +12,7 @@ domain-specific functions and data types beyond those provided by the
core language. For example, Skylark is embedded within (and was
originally developed for) the [Bazel build tool](https://bazel.build),
and [Bazel's build language](https://docs.bazel.build/versions/master/skylark/language.html) is based on Skylark.
-Another implementation in Go can be found here: https://github.com/google/skylark/
+Another implementation in Go can be found here: [https://github.com/google/skylark/](https://github.com/google/skylark/)
This document was derived from the [description of the Go
implementation](https://github.com/google/skylark/blob/master/doc/spec.md)
@@ -23,7 +23,7 @@ and the Go specification, Copyright 2009&ndash;2017, The Go Authors. It is
now maintained by the Bazel team.
The name "Skylark" is a code name of the Bazel project.
-We plan to rename the language before the end of 2017 to reflect its
+We plan to rename the language soon to reflect its
applicability to projects unrelated to Bazel.
<!-- [TOC] -->
@@ -1149,8 +1149,6 @@ CallSuffix = '(' [Arguments [',']] ')' .
SliceSuffix = '[' [Expression] [':' Test [':' Test]] ']' .
```
-TODO: resolve position of -x, and 'not x' in grammar: Operand or UnaryExpr?
-
### Identifiers
```text
@@ -1272,7 +1270,7 @@ There are two unary operators, both appearing before their operand:
`-`, and `not`.
```text
-UnaryExpr = '-' PrimaryExpr
+UnaryExpr = '-' Test
| 'not' Test
.
```
@@ -3211,7 +3209,6 @@ Operand = identifier
| ListExpr | ListComp
| DictExpr | DictComp
| '(' [Expression [',']] ')'
- | '-' PrimaryExpr
.
DotSuffix = '.' identifier .
@@ -3232,7 +3229,9 @@ Entry = Test ':' Test .
CompClause = 'for' LoopVariables 'in' Test | 'if' Test .
-UnaryExpr = 'not' Test .
+UnaryExpr = '-' Test
+ | 'not' Test
+ .
BinaryExpr = Test {Binop Test} .