Skip to content

Commit

Permalink
fix: rename namespace -> attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
victorhqc committed Sep 20, 2019
1 parent d51e8c9 commit 39cfea3
Show file tree
Hide file tree
Showing 6 changed files with 172 additions and 172 deletions.
22 changes: 11 additions & 11 deletions corpus/model.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ model User {
)

=========================
Model with namespaces
Model with attributes
=========================

model User {
Expand All @@ -70,7 +70,7 @@ model User {
(column_type
(identifier)
)
(namespace
(attribute
(call_expression
(identifier)
(arguments
Expand All @@ -81,7 +81,7 @@ model User {
)
)
)
(namespace
(attribute
(identifier)
)
)
Expand All @@ -90,7 +90,7 @@ model User {
(column_type
(identifier)
)
(namespace
(attribute
(identifier)
)
)
Expand All @@ -99,7 +99,7 @@ model User {
(column_type
(identifier)
)
(namespace
(attribute
(call_expression
(identifier)
(arguments)
Expand All @@ -111,7 +111,7 @@ model User {
)

=========================
Model with object namespace
Model with object attribute
=========================

model User {
Expand All @@ -128,10 +128,10 @@ model User {
(column_type
(identifier)
)
(namespace
(attribute
(identifier)
)
(namespace
(attribute
(member_expression
(identifier)
(property_identifier)
Expand Down Expand Up @@ -162,10 +162,10 @@ model User {
(column_type
(identifier)
)
(namespace
(attribute
(identifier)
)
(namespace
(attribute
(identifier)
)
)
Expand All @@ -174,7 +174,7 @@ model User {
(column_type
(identifier)
)
(namespace
(attribute
(identifier)
)
)
Expand Down
6 changes: 3 additions & 3 deletions corpus/type.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type UUID String @go.type("uuid.UUID")
(type_declaration
(identifier)
(identifier)
(namespace
(attribute
(call_expression
(member_expression
(identifier)
Expand Down Expand Up @@ -39,7 +39,7 @@ type Numeric = Float @pg.numeric(precision: 5, scale: 2)
(variable)
(identifier)
)
(namespace
(attribute
(call_expression
(member_expression
(identifier)
Expand All @@ -57,7 +57,7 @@ type Numeric = Float @pg.numeric(precision: 5, scale: 2)
)
)
)
(namespace
(attribute
(call_expression
(member_expression
(identifier)
Expand Down
6 changes: 3 additions & 3 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ module.exports = grammar({
$.identifier,
$.column_type,
optional(repeat(
$.namespace
$.attribute
)),
),

Expand All @@ -139,7 +139,7 @@ module.exports = grammar({
$.identifier,
$.type_expression,
$.block_attribute_declaration,
$.namespace,
$.attribute,
$.member_expression,
$.number,
$.string,
Expand Down Expand Up @@ -210,7 +210,7 @@ module.exports = grammar({
$.arguments,
)),

namespace: $ => seq(
attribute: $ => seq(
'@',
$._expression,
),
Expand Down
6 changes: 3 additions & 3 deletions src/grammar.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@
"type": "REPEAT",
"content": {
"type": "SYMBOL",
"name": "namespace"
"name": "attribute"
}
},
{
Expand Down Expand Up @@ -290,7 +290,7 @@
},
{
"type": "SYMBOL",
"name": "namespace"
"name": "attribute"
},
{
"type": "SYMBOL",
Expand Down Expand Up @@ -883,7 +883,7 @@
]
}
},
"namespace": {
"attribute": {
"type": "SEQ",
"members": [
{
Expand Down
Loading

0 comments on commit 39cfea3

Please sign in to comment.