Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Update scope for object properties#225

Merged
sadikovi merged 1 commit intoatom:masterfrom
sadikovi:update-object-property-scope
Apr 2, 2020
Merged

Update scope for object properties#225
sadikovi merged 1 commit intoatom:masterfrom
sadikovi:update-object-property-scope

Conversation

@sadikovi
Copy link
Contributor

@sadikovi sadikovi commented Apr 1, 2020

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • All new code requires tests to ensure against regressions

Description of the Change

This PR removes usage of variable.other.property.java, replaces it with variable.other.object.property.java.

Having variable.other.property.java does not make sense since there is no property call without an object/instance. This change unifies object with properties in terms of scope, see below:

Before

object.property1.property2

// would result in 
// object => [variable.other.object.java]
// property1 => [variable.other.object.property.java]
// property2 => [variable.other.property.java]

After

object.property1.property2

// would result in 
// object => [variable.other.object.java]
// property1 => [variable.other.object.property.java]
// property2 => [variable.other.object.property.java]

The same is applicable for object.property:
Before:

[variable.other.object.java].[variable.other.property.java]

After:

[variable.other.object.java].[variable.other.object.property.java]

Alternate Designs

None were considered.

Benefits

Makes the grammar consistent, all properties get scope variable.other.object.property.java. Allows syntax highlighting to rely on the fact that all properties will have this scope.

Possible Drawbacks

Could potentially break syntax highlighting that relies on separation between trailing and non-trailing properties.

Applicable Issues

Closes #224

@sadikovi sadikovi changed the title update scope for object properties Update scope for object properties Apr 1, 2020
@sadikovi sadikovi merged commit d0373f1 into atom:master Apr 2, 2020
@sadikovi sadikovi deleted the update-object-property-scope branch April 2, 2020 06:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Field has different pattern if "this" is omitted

2 participants