replace leading _ for private symbols with keyword hide
This commit is contained in:
@@ -51,6 +51,7 @@ module.exports = grammar({
|
||||
),
|
||||
|
||||
function_declaration: $ => seq(
|
||||
optional('hide'),
|
||||
field('name', $.identifier),
|
||||
field('kind', choice('func', 'c_func')),
|
||||
field('parameters', $.parameter_list),
|
||||
@@ -64,6 +65,7 @@ module.exports = grammar({
|
||||
),
|
||||
|
||||
type_declaration: $ => prec(1, seq(
|
||||
optional('hide'),
|
||||
field('name', $.identifier),
|
||||
'::',
|
||||
repeat($._newline),
|
||||
@@ -79,6 +81,7 @@ module.exports = grammar({
|
||||
)),
|
||||
|
||||
global_constant_declaration: $ => seq(
|
||||
optional('hide'),
|
||||
field('name', $.identifier),
|
||||
optional(field('type', $.type)),
|
||||
'::',
|
||||
@@ -87,6 +90,7 @@ module.exports = grammar({
|
||||
),
|
||||
|
||||
global_variable_declaration: $ => seq(
|
||||
optional('hide'),
|
||||
field('name', $.identifier),
|
||||
optional(field('type', $.type)),
|
||||
'=',
|
||||
|
||||
Reference in New Issue
Block a user