@@ -19,7 +19,7 @@ message, field, enum, and so on, that specify the behavior of protoc, the code
1919generators, and protobuf runtimes. You can explicitly override a behavior at
2020those different levels (file, message, field, ...) when your needs don't match
2121the default behavior for the edition you've selected. You can also override your
22- overrides. The [ section later in this topic on inheritance ] ( #inheritance ) goes
22+ overrides. The [ section later in this topic on lexical scoping ] ( #scoping ) goes
2323into more detail on that.
2424
2525## Lifecycle of a Feature {#lifecycles}
@@ -202,16 +202,19 @@ message Player {
202202
203203</section >
204204
205- ### Inheritance {# inheritance}
205+ < a name = " inheritance " ></ a >
206206
207- Editions syntax supports inheritance, with a per-feature list of allowed
207+ ### Lexical Scoping {#scoping}
208+
209+ Editions syntax supports lexical scoping, with a per-feature list of allowed
208210targets. For example, in the first edition, features can be specified at only
209- the file level or the lowest level of granularity. Inheritance enables you to
210- set the default behavior for a feature across an entire file, and then override
211- that behavior at the message, field, enum, enum value, oneof, service, or
212- method. Settings made at a higher level (file, message) apply when no setting is
213- made within the same scope (field, enum value). Any features not explicitly set
214- conform to the behavior defined in the edition version used for the .proto file.
211+ the file level or the lowest level of granularity. The implementation of lexical
212+ scoping enables you to set the default behavior for a feature across an entire
213+ file, and then override that behavior at the message, field, enum, enum value,
214+ oneof, service, or method level. Settings made at a higher level (file, message)
215+ apply when no setting is made within the same scope (field, enum value). Any
216+ features not explicitly set conform to the behavior defined in the edition
217+ version used for the .proto file.
215218
216219The following code sample shows some features being set at the file, message,
217220and enum level. The settings are in the highlighted lines:
@@ -243,7 +246,7 @@ message Person {
243246
244247In the preceding example, the presence feature is set to ` IMPLICIT ` ; it would
245248default to ` EXPLICIT ` if it wasn't set. The ` Pay_Type ` ` enum ` will be ` CLOSED ` ,
246- as it inherits the file-level setting. The ` Employment ` ` enum ` , though, will be
249+ as it applies the file-level setting. The ` Employment ` ` enum ` , though, will be
247250` OPEN ` , as it is set within the enum.
248251
249252### Prototiller {#prototiller}
0 commit comments