From 31a58bc7e427c4e9b47b0eabdd5786ab20015191 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Sun, 9 Mar 2014 22:05:17 -0700 Subject: [PATCH] Make include guards pass cpplint --- include/tree_sitter/compiler.h | 6 +++--- include/tree_sitter/parser.h | 8 ++++---- include/tree_sitter/runtime.h | 18 +++++++++--------- script/lint.sh | 9 +++++---- src/compiler/build_tables/build_tables.h | 6 +++--- src/compiler/build_tables/first_set.h | 6 +++--- src/compiler/build_tables/follow_sets.h | 6 +++--- src/compiler/build_tables/item.h | 6 +++--- src/compiler/build_tables/item_set_closure.h | 6 +++--- .../build_tables/item_set_transitions.h | 6 +++--- src/compiler/build_tables/merge_transitions.h | 6 +++--- src/compiler/build_tables/rule_can_be_blank.h | 6 +++--- src/compiler/build_tables/rule_transitions.h | 6 +++--- src/compiler/generate_code/c_code.h | 6 +++--- src/compiler/generate_code/helpers.h | 6 +++--- src/compiler/lex_table.h | 6 +++--- src/compiler/parse_table.h | 6 +++--- src/compiler/prepare_grammar/expand_repeats.h | 6 +++--- src/compiler/prepare_grammar/extract_tokens.h | 6 +++--- src/compiler/prepare_grammar/prepare_grammar.h | 6 +++--- src/compiler/prepared_grammar.h | 6 +++--- src/compiler/rules/blank.h | 6 +++--- src/compiler/rules/built_in_symbols.h | 6 +++--- src/compiler/rules/character_range.h | 14 +++++++------- src/compiler/rules/character_set.h | 6 +++--- src/compiler/rules/choice.h | 6 +++--- src/compiler/rules/pattern.h | 6 +++--- src/compiler/rules/repeat.h | 6 +++--- src/compiler/rules/rule.h | 6 +++--- src/compiler/rules/seq.h | 6 +++--- src/compiler/rules/string.h | 6 +++--- src/compiler/rules/symbol.h | 7 +++---- src/compiler/rules/visitor.h | 6 +++--- 33 files changed, 112 insertions(+), 112 deletions(-) diff --git a/include/tree_sitter/compiler.h b/include/tree_sitter/compiler.h index 718a4f63..ad334920 100644 --- a/include/tree_sitter/compiler.h +++ b/include/tree_sitter/compiler.h @@ -1,5 +1,5 @@ -#ifndef tree_sitter_compiler_h -#define tree_sitter_compiler_h +#ifndef TREE_SITTER_COMPILER_H_ +#define TREE_SITTER_COMPILER_H_ #include #include @@ -37,4 +37,4 @@ namespace tree_sitter { std::string compile(const Grammar &grammar, std::string name); } -#endif +#endif // TREE_SITTER_COMPILER_H_ diff --git a/include/tree_sitter/parser.h b/include/tree_sitter/parser.h index ea0d6d2d..a0c1be12 100644 --- a/include/tree_sitter/parser.h +++ b/include/tree_sitter/parser.h @@ -1,14 +1,14 @@ -#ifndef tree_sitter_parser_h -#define tree_sitter_parser_h +#ifndef TREE_SITTER_PARSER_H_ +#define TREE_SITTER_PARSER_H_ #ifdef __cplusplus extern "C" { #endif -#include "./runtime.h" #include #include #include +#include "tree_sitter/runtime.h" //#define TS_DEBUG_PARSE //#define TS_DEBUG_LEX @@ -310,4 +310,4 @@ return ts_parser_tree(parser); } #endif -#endif +#endif // TREE_SITTER_PARSER_H_ diff --git a/include/tree_sitter/runtime.h b/include/tree_sitter/runtime.h index 6f3a4bca..cff6a4d2 100644 --- a/include/tree_sitter/runtime.h +++ b/include/tree_sitter/runtime.h @@ -1,5 +1,5 @@ -#ifndef tree_sitter_runtime_h -#define tree_sitter_runtime_h +#ifndef TREE_SITTER_RUNTIME_H_ +#define TREE_SITTER_RUNTIME_H_ #ifdef __cplusplus extern "C" { @@ -55,15 +55,15 @@ typedef struct { typedef struct ts_document ts_document; ts_document * ts_document_make(); -void ts_document_free(ts_document *); -void ts_document_set_parser(ts_document *, ts_parse_config); -void ts_document_set_input(ts_document *, ts_input input); -void ts_document_set_input_string(ts_document *, const char *text); -const ts_tree * ts_document_tree(const ts_document *); -const char * ts_document_string(const ts_document *); +void ts_document_free(ts_document *doc); +void ts_document_set_parser(ts_document *doc, ts_parse_config parser); +void ts_document_set_input(ts_document *doc, ts_input input); +void ts_document_set_input_string(ts_document *doc, const char *text); +const ts_tree * ts_document_tree(const ts_document *doc); +const char * ts_document_string(const ts_document *doc); #ifdef __cplusplus } #endif -#endif +#endif // TREE_SITTER_RUNTIME_H_ diff --git a/script/lint.sh b/script/lint.sh index 769f268f..c7935875 100755 --- a/script/lint.sh +++ b/script/lint.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash -find src -type f | xargs externals/cpplint.py \ - --root=src \ - --filter=-whitespace,-readability/namespace,-legal/copyright \ - 2>&1 +filters=-whitespace,-readability/namespace,-legal/copyright +cpplint=externals/cpplint.py + +find src -type f | xargs $cpplint --root=src --filter=$filters 2>&1 +find include -type f | xargs $cpplint --root=include --filter=$filters 2>&1 diff --git a/src/compiler/build_tables/build_tables.h b/src/compiler/build_tables/build_tables.h index 729deb9e..2932d21e 100644 --- a/src/compiler/build_tables/build_tables.h +++ b/src/compiler/build_tables/build_tables.h @@ -1,5 +1,5 @@ -#ifndef __TreeSitter__build_tables__ -#define __TreeSitter__build_tables__ +#ifndef COMPILER_BUILD_TABLES_BUILD_TABLES_H_ +#define COMPILER_BUILD_TABLES_BUILD_TABLES_H_ #include #include "compiler/parse_table.h" @@ -13,4 +13,4 @@ namespace tree_sitter { } } -#endif +#endif // COMPILER_BUILD_TABLES_BUILD_TABLES_H_ diff --git a/src/compiler/build_tables/first_set.h b/src/compiler/build_tables/first_set.h index 0d1ea315..697688ec 100644 --- a/src/compiler/build_tables/first_set.h +++ b/src/compiler/build_tables/first_set.h @@ -1,5 +1,5 @@ -#ifndef __tree_sitter__first_set__ -#define __tree_sitter__first_set__ +#ifndef COMPILER_BUILD_TABLES_FIRST_SET_H_ +#define COMPILER_BUILD_TABLES_FIRST_SET_H_ #include #include "compiler/build_tables/item.h" @@ -25,4 +25,4 @@ namespace tree_sitter { } } -#endif +#endif // COMPILER_BUILD_TABLES_FIRST_SET_H_ diff --git a/src/compiler/build_tables/follow_sets.h b/src/compiler/build_tables/follow_sets.h index 3b750a62..721cbb4f 100644 --- a/src/compiler/build_tables/follow_sets.h +++ b/src/compiler/build_tables/follow_sets.h @@ -1,5 +1,5 @@ -#ifndef __tree_sitter__follow_sets__ -#define __tree_sitter__follow_sets__ +#ifndef COMPILER_BUILD_TABLES_FOLLOW_SETS_H_ +#define COMPILER_BUILD_TABLES_FOLLOW_SETS_H_ #include #include @@ -22,4 +22,4 @@ namespace tree_sitter { } } -#endif +#endif // COMPILER_BUILD_TABLES_FOLLOW_SETS_H_ diff --git a/src/compiler/build_tables/item.h b/src/compiler/build_tables/item.h index 292478be..bb54f4ee 100644 --- a/src/compiler/build_tables/item.h +++ b/src/compiler/build_tables/item.h @@ -1,5 +1,5 @@ -#ifndef __tree_sitter__item__ -#define __tree_sitter__item__ +#ifndef COMPILER_BUILD_TABLES_ITEM_H_ +#define COMPILER_BUILD_TABLES_ITEM_H_ #include #include @@ -76,4 +76,4 @@ namespace std { }; } -#endif +#endif // COMPILER_BUILD_TABLES_ITEM_H_ diff --git a/src/compiler/build_tables/item_set_closure.h b/src/compiler/build_tables/item_set_closure.h index f7fdde89..ef03cb31 100644 --- a/src/compiler/build_tables/item_set_closure.h +++ b/src/compiler/build_tables/item_set_closure.h @@ -1,5 +1,5 @@ -#ifndef __tree_sitter__close_item_set__ -#define __tree_sitter__close_item_set__ +#ifndef COMPILER_BUILD_TABLES_ITEM_SET_CLOSURE_H_ +#define COMPILER_BUILD_TABLES_ITEM_SET_CLOSURE_H_ #include "compiler/build_tables/item.h" @@ -11,4 +11,4 @@ namespace tree_sitter { } } -#endif +#endif // COMPILER_BUILD_TABLES_ITEM_SET_CLOSURE_H_ diff --git a/src/compiler/build_tables/item_set_transitions.h b/src/compiler/build_tables/item_set_transitions.h index a16e7f73..976fba07 100644 --- a/src/compiler/build_tables/item_set_transitions.h +++ b/src/compiler/build_tables/item_set_transitions.h @@ -1,5 +1,5 @@ -#ifndef __tree_sitter__item_set_transitions__ -#define __tree_sitter__item_set_transitions__ +#ifndef COMPILER_BUILD_TABLES_ITEM_SET_TRANSITIONS_H_ +#define COMPILER_BUILD_TABLES_ITEM_SET_TRANSITIONS_H_ #include #include "compiler/build_tables/item.h" @@ -17,4 +17,4 @@ namespace tree_sitter { } } -#endif +#endif // COMPILER_BUILD_TABLES_ITEM_SET_TRANSITIONS_H_ diff --git a/src/compiler/build_tables/merge_transitions.h b/src/compiler/build_tables/merge_transitions.h index 340353ec..9032f590 100644 --- a/src/compiler/build_tables/merge_transitions.h +++ b/src/compiler/build_tables/merge_transitions.h @@ -1,5 +1,5 @@ -#ifndef __tree_sitter__merge_transitions__ -#define __tree_sitter__merge_transitions__ +#ifndef COMPILER_BUILD_TABLES_MERGE_TRANSITIONS_H_ +#define COMPILER_BUILD_TABLES_MERGE_TRANSITIONS_H_ #include #include "compiler/rules/character_set.h" @@ -68,4 +68,4 @@ namespace tree_sitter { } } -#endif +#endif // COMPILER_BUILD_TABLES_MERGE_TRANSITIONS_H_ diff --git a/src/compiler/build_tables/rule_can_be_blank.h b/src/compiler/build_tables/rule_can_be_blank.h index 2a95e3a6..c62689d9 100644 --- a/src/compiler/build_tables/rule_can_be_blank.h +++ b/src/compiler/build_tables/rule_can_be_blank.h @@ -1,5 +1,5 @@ -#ifndef __tree_sitter__rule_can_be_blank__ -#define __tree_sitter__rule_can_be_blank__ +#ifndef COMPILER_BUILD_TABLES_RULE_CAN_BE_BLANK_H_ +#define COMPILER_BUILD_TABLES_RULE_CAN_BE_BLANK_H_ #include "tree_sitter/compiler.h" @@ -12,4 +12,4 @@ namespace tree_sitter { } } -#endif +#endif // COMPILER_BUILD_TABLES_RULE_CAN_BE_BLANK_H_ diff --git a/src/compiler/build_tables/rule_transitions.h b/src/compiler/build_tables/rule_transitions.h index 5bcfe2aa..a461a2eb 100644 --- a/src/compiler/build_tables/rule_transitions.h +++ b/src/compiler/build_tables/rule_transitions.h @@ -1,5 +1,5 @@ -#ifndef __tree_sitter__transitions__ -#define __tree_sitter__transitions__ +#ifndef COMPILER_BUILD_TABLES_RULE_TRANSITIONS_H_ +#define COMPILER_BUILD_TABLES_RULE_TRANSITIONS_H_ #include #include "compiler/rules/character_set.h" @@ -12,4 +12,4 @@ namespace tree_sitter { } } -#endif \ No newline at end of file +#endif // COMPILER_BUILD_TABLES_RULE_TRANSITIONS_H_ \ No newline at end of file diff --git a/src/compiler/generate_code/c_code.h b/src/compiler/generate_code/c_code.h index 066ef096..7ead594c 100644 --- a/src/compiler/generate_code/c_code.h +++ b/src/compiler/generate_code/c_code.h @@ -1,5 +1,5 @@ -#ifndef __tree_sitter__code_generator__ -#define __tree_sitter__code_generator__ +#ifndef COMPILER_GENERATE_CODE_C_CODE_H_ +#define COMPILER_GENERATE_CODE_C_CODE_H_ #include "compiler/parse_table.h" #include "compiler/lex_table.h" @@ -10,4 +10,4 @@ namespace tree_sitter { } } -#endif +#endif // COMPILER_GENERATE_CODE_C_CODE_H_ diff --git a/src/compiler/generate_code/helpers.h b/src/compiler/generate_code/helpers.h index 9bee4802..67487859 100644 --- a/src/compiler/generate_code/helpers.h +++ b/src/compiler/generate_code/helpers.h @@ -1,5 +1,5 @@ -#ifndef __tree_sitter__helpers__ -#define __tree_sitter__helpers__ +#ifndef COMPILER_GENERATE_CODE_HELPERS_H_ +#define COMPILER_GENERATE_CODE_HELPERS_H_ #include #include @@ -16,4 +16,4 @@ namespace tree_sitter { } } -#endif +#endif // COMPILER_GENERATE_CODE_HELPERS_H_ diff --git a/src/compiler/lex_table.h b/src/compiler/lex_table.h index 98d81f0b..4c7a2d18 100644 --- a/src/compiler/lex_table.h +++ b/src/compiler/lex_table.h @@ -1,5 +1,5 @@ -#ifndef __TreeSitter__lex_table__ -#define __TreeSitter__lex_table__ +#ifndef COMPILER_LEX_TABLE_H_ +#define COMPILER_LEX_TABLE_H_ #include #include @@ -65,4 +65,4 @@ namespace tree_sitter { }; } -#endif +#endif // COMPILER_LEX_TABLE_H_ diff --git a/src/compiler/parse_table.h b/src/compiler/parse_table.h index 9457e962..6bfabfc9 100644 --- a/src/compiler/parse_table.h +++ b/src/compiler/parse_table.h @@ -1,5 +1,5 @@ -#ifndef __TreeSitter__parse_table__ -#define __TreeSitter__parse_table__ +#ifndef COMPILER_PARSE_TABLE_H_ +#define COMPILER_PARSE_TABLE_H_ #include #include @@ -71,4 +71,4 @@ namespace tree_sitter { }; } -#endif +#endif // COMPILER_PARSE_TABLE_H_ diff --git a/src/compiler/prepare_grammar/expand_repeats.h b/src/compiler/prepare_grammar/expand_repeats.h index 7d1b73e2..636e7546 100644 --- a/src/compiler/prepare_grammar/expand_repeats.h +++ b/src/compiler/prepare_grammar/expand_repeats.h @@ -1,5 +1,5 @@ -#ifndef __tree_sitter__expand_repeats__ -#define __tree_sitter__expand_repeats__ +#ifndef COMPILER_PREPARE_GRAMMAR_EXPAND_REPEATS_H_ +#define COMPILER_PREPARE_GRAMMAR_EXPAND_REPEATS_H_ #include "tree_sitter/compiler.h" @@ -11,4 +11,4 @@ namespace tree_sitter { } } -#endif +#endif // COMPILER_PREPARE_GRAMMAR_EXPAND_REPEATS_H_ diff --git a/src/compiler/prepare_grammar/extract_tokens.h b/src/compiler/prepare_grammar/extract_tokens.h index 70acf48e..99277774 100644 --- a/src/compiler/prepare_grammar/extract_tokens.h +++ b/src/compiler/prepare_grammar/extract_tokens.h @@ -1,5 +1,5 @@ -#ifndef __tree_sitter__extract_tokens__ -#define __tree_sitter__extract_tokens__ +#ifndef COMPILER_PREPARE_GRAMMAR_EXTRACT_TOKENS_H_ +#define COMPILER_PREPARE_GRAMMAR_EXTRACT_TOKENS_H_ #include @@ -11,4 +11,4 @@ namespace tree_sitter { } } -#endif +#endif // COMPILER_PREPARE_GRAMMAR_EXTRACT_TOKENS_H_ diff --git a/src/compiler/prepare_grammar/prepare_grammar.h b/src/compiler/prepare_grammar/prepare_grammar.h index 1c3f80fc..bc30bd73 100644 --- a/src/compiler/prepare_grammar/prepare_grammar.h +++ b/src/compiler/prepare_grammar/prepare_grammar.h @@ -1,5 +1,5 @@ -#ifndef __tree_sitter__prepare_grammar__ -#define __tree_sitter__prepare_grammar__ +#ifndef COMPILER_PREPARE_GRAMMAR_PREPARE_GRAMMAR_H_ +#define COMPILER_PREPARE_GRAMMAR_PREPARE_GRAMMAR_H_ #include @@ -12,4 +12,4 @@ namespace tree_sitter { } } -#endif +#endif // COMPILER_PREPARE_GRAMMAR_PREPARE_GRAMMAR_H_ diff --git a/src/compiler/prepared_grammar.h b/src/compiler/prepared_grammar.h index 08298a46..35e14b19 100644 --- a/src/compiler/prepared_grammar.h +++ b/src/compiler/prepared_grammar.h @@ -1,5 +1,5 @@ -#ifndef __tree_sitter__prepared_grammar__ -#define __tree_sitter__prepared_grammar__ +#ifndef COMPILER_PREPARED_GRAMMAR_H_ +#define COMPILER_PREPARED_GRAMMAR_H_ #include "tree_sitter/compiler.h" #include "compiler/rules/symbol.h" @@ -27,4 +27,4 @@ namespace tree_sitter { std::string compile(const Grammar &grammar, std::string name); } -#endif +#endif // COMPILER_PREPARED_GRAMMAR_H_ diff --git a/src/compiler/rules/blank.h b/src/compiler/rules/blank.h index 9b19950d..22528946 100644 --- a/src/compiler/rules/blank.h +++ b/src/compiler/rules/blank.h @@ -1,5 +1,5 @@ -#ifndef __tree_sitter__blank__ -#define __tree_sitter__blank__ +#ifndef COMPILER_RULES_BLANK_H_ +#define COMPILER_RULES_BLANK_H_ #include "compiler/rules/rule.h" @@ -18,4 +18,4 @@ namespace tree_sitter { } } -#endif \ No newline at end of file +#endif // COMPILER_RULES_BLANK_H_ diff --git a/src/compiler/rules/built_in_symbols.h b/src/compiler/rules/built_in_symbols.h index 64f6d9b7..e2360c71 100644 --- a/src/compiler/rules/built_in_symbols.h +++ b/src/compiler/rules/built_in_symbols.h @@ -1,5 +1,5 @@ -#ifndef __tree_sitter__built_in_symbols__ -#define __tree_sitter__built_in_symbols__ +#ifndef COMPILER_RULES_BUILT_IN_SYMBOLS_H_ +#define COMPILER_RULES_BUILT_IN_SYMBOLS_H_ #include "compiler/rules/symbol.h" @@ -11,4 +11,4 @@ namespace tree_sitter { } } -#endif +#endif // COMPILER_RULES_BUILT_IN_SYMBOLS_H_ diff --git a/src/compiler/rules/character_range.h b/src/compiler/rules/character_range.h index bbc8a580..3546f349 100644 --- a/src/compiler/rules/character_range.h +++ b/src/compiler/rules/character_range.h @@ -1,5 +1,5 @@ -#ifndef __tree_sitter_character_range_h__ -#define __tree_sitter_character_range_h__ +#ifndef COMPILER_RULES_CHARACTER_RANGE_H_ +#define COMPILER_RULES_CHARACTER_RANGE_H_ #include #include @@ -9,10 +9,10 @@ namespace tree_sitter { struct CharacterRange { char min; char max; - CharacterRange(char); - CharacterRange(char, char); - bool operator==(const CharacterRange &) const; - bool operator<(const CharacterRange &) const; + CharacterRange(char value); + CharacterRange(char min, char max); + bool operator==(const CharacterRange &other) const; + bool operator<(const CharacterRange &others) const; std::string to_string() const; }; } @@ -27,4 +27,4 @@ namespace std { }; } -#endif +#endif // COMPILER_RULES_CHARACTER_RANGE_H_ diff --git a/src/compiler/rules/character_set.h b/src/compiler/rules/character_set.h index 89664acc..8037b81a 100644 --- a/src/compiler/rules/character_set.h +++ b/src/compiler/rules/character_set.h @@ -1,5 +1,5 @@ -#ifndef __tree_sitter__character_set__ -#define __tree_sitter__character_set__ +#ifndef COMPILER_RULES_CHARACTER_SET_H_ +#define COMPILER_RULES_CHARACTER_SET_H_ #include #include @@ -42,4 +42,4 @@ namespace std { }; } -#endif +#endif // COMPILER_RULES_CHARACTER_SET_H_ diff --git a/src/compiler/rules/choice.h b/src/compiler/rules/choice.h index 77e0a69e..dcbec97b 100644 --- a/src/compiler/rules/choice.h +++ b/src/compiler/rules/choice.h @@ -1,5 +1,5 @@ -#ifndef __tree_sitter__choice__ -#define __tree_sitter__choice__ +#ifndef COMPILER_RULES_CHOICE_H_ +#define COMPILER_RULES_CHOICE_H_ #include #include "compiler/rules/rule.h" @@ -23,4 +23,4 @@ namespace tree_sitter { } } -#endif \ No newline at end of file +#endif // COMPILER_RULES_CHOICE_H_ \ No newline at end of file diff --git a/src/compiler/rules/pattern.h b/src/compiler/rules/pattern.h index b556a3db..d2081962 100644 --- a/src/compiler/rules/pattern.h +++ b/src/compiler/rules/pattern.h @@ -1,5 +1,5 @@ -#ifndef __tree_sitter_pattern_h_ -#define __tree_sitter_pattern_h_ +#ifndef COMPILER_RULES_PATTERN_H_ +#define COMPILER_RULES_PATTERN_H_ #include "compiler/rules/rule.h" @@ -21,5 +21,5 @@ namespace tree_sitter { } } -#endif +#endif // COMPILER_RULES_PATTERN_H_ diff --git a/src/compiler/rules/repeat.h b/src/compiler/rules/repeat.h index 9a8bc322..013dea96 100644 --- a/src/compiler/rules/repeat.h +++ b/src/compiler/rules/repeat.h @@ -1,5 +1,5 @@ -#ifndef __tree_sitter__repeat__ -#define __tree_sitter__repeat__ +#ifndef COMPILER_RULES_REPEAT_H_ +#define COMPILER_RULES_REPEAT_H_ #include "compiler/rules/rule.h" @@ -20,4 +20,4 @@ namespace tree_sitter { } } -#endif +#endif // COMPILER_RULES_REPEAT_H_ diff --git a/src/compiler/rules/rule.h b/src/compiler/rules/rule.h index f21d8f45..48141de5 100644 --- a/src/compiler/rules/rule.h +++ b/src/compiler/rules/rule.h @@ -1,5 +1,5 @@ -#ifndef __TreeSitter__rule__ -#define __TreeSitter__rule__ +#ifndef COMPILER_RULES_RULE_H_ +#define COMPILER_RULES_RULE_H_ #include #include @@ -35,4 +35,4 @@ namespace std { }; } -#endif \ No newline at end of file +#endif // COMPILER_RULES_RULE_H_ diff --git a/src/compiler/rules/seq.h b/src/compiler/rules/seq.h index 11f3b098..5f00d6f9 100644 --- a/src/compiler/rules/seq.h +++ b/src/compiler/rules/seq.h @@ -1,5 +1,5 @@ -#ifndef __tree_sitter__seq__ -#define __tree_sitter__seq__ +#ifndef COMPILER_RULES_SEQ_H_ +#define COMPILER_RULES_SEQ_H_ #include #include "compiler/rules/rule.h" @@ -23,4 +23,4 @@ namespace tree_sitter { } } -#endif +#endif // COMPILER_RULES_SEQ_H_ diff --git a/src/compiler/rules/string.h b/src/compiler/rules/string.h index c67e2b37..0bc28c94 100644 --- a/src/compiler/rules/string.h +++ b/src/compiler/rules/string.h @@ -1,5 +1,5 @@ -#ifndef __tree_sitter__string__ -#define __tree_sitter__string__ +#ifndef COMPILER_RULES_STRING_H_ +#define COMPILER_RULES_STRING_H_ #include "compiler/rules/rule.h" @@ -20,4 +20,4 @@ namespace tree_sitter { } } -#endif +#endif // COMPILER_RULES_STRING_H_ diff --git a/src/compiler/rules/symbol.h b/src/compiler/rules/symbol.h index f92da38d..d1b4e912 100644 --- a/src/compiler/rules/symbol.h +++ b/src/compiler/rules/symbol.h @@ -1,5 +1,5 @@ -#ifndef __tree_sitter__sym__ -#define __tree_sitter__sym__ +#ifndef COMPILER_RULES_SYMBOL_H_ +#define COMPILER_RULES_SYMBOL_H_ #include #include "compiler/rules/rule.h" @@ -46,5 +46,4 @@ namespace std { }; } - -#endif \ No newline at end of file +#endif // COMPILER_RULES_SYMBOL_H_ diff --git a/src/compiler/rules/visitor.h b/src/compiler/rules/visitor.h index 176fb38a..6cf075aa 100644 --- a/src/compiler/rules/visitor.h +++ b/src/compiler/rules/visitor.h @@ -1,5 +1,5 @@ -#ifndef __tree_sitter__rule_visitor__ -#define __tree_sitter__rule_visitor__ +#ifndef COMPILER_RULES_VISITOR_H_ +#define COMPILER_RULES_VISITOR_H_ #include "compiler/rules/rule.h" @@ -41,4 +41,4 @@ namespace tree_sitter { } } -#endif +#endif // COMPILER_RULES_VISITOR_H_