Skip to content

Commit 525eb1c

Browse files
praihanfacebook-github-bot
authored andcommitted
Remove footer from spec
Summary: If we have `export`s that are inlined in the `body` then we cannot have a `footer`. It will always be empty per the grammar because it's a strict subset of `body`. So let's remove it. Reviewed By: iahs Differential Revision: D69262859 fbshipit-source-id: 23b7d24368d4fbd5662d002df48c329e72da9f27
1 parent 43d121d commit 525eb1c

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

thrift/doc/contributions/whisker.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -86,30 +86,25 @@ The supported set of combinators are:
8686

8787
## File Structure
8888

89-
A Whisker source file's `body` is a repeated pattern of textual content, variable interpolations, and control flow constructs (condition, iteration).
89+
A Whisker source file is composed of two sections: a leading `header` followed by the main `body`.
9090

91-
The source file's `body` is wrapped by a leading `header`, and a trailing `footer`. The rest of this document describes the contents of the `body`.
91+
The `body` is a repeated pattern of textual content, variable interpolations, and control flow constructs (condition, iteration).
92+
The rest of this document describes its contents.
9293

93-
`header` and `footer` are *unrendered* sections of the source. They may contain:
94+
The `header` is an *unrendered* section of the source. It may contain:
9495
* [Comments](#comments)
9596
* [Pragma statements](#pragma-statements)
9697
* [Whitespace-only `text` (including `newline`)](#text).
97-
98-
The `header` may also contain:
9998
* [Import statements](#modules)
10099

101-
The `footer` may also contain:
102-
* [Export statements](#modules)
103-
104-
Rendering ignores all whitespaces in the `header` and the `footer`.
100+
Rendering ignores all whitespaces in the `header`.
105101

106102
<Grammar>
107103

108104
```
109-
root → { (whitespace* ~ header)* ~ body* ~ (whitespace* ~ footer)* }
105+
root → { (whitespace* ~ header)* ~ body* }
110106
111107
header → { comment | pragma-statement | import-statement }
112-
footer → { comment | pragma-statement | export-statement }
113108
114109
body → { text | template }
115110
text → { <see below> }

0 commit comments

Comments
 (0)