diff --git a/source/csml.l b/source/csml.l index c9c4638..d0545f9 100644 --- a/source/csml.l +++ b/source/csml.l @@ -8,8 +8,6 @@ std::stack tag_stack; std::string tag_candidate = ""; -static int ignore_count = 1; // number of '{' / '}'s to be placed around the current ignored block -static int ignore_i = 1; // number of '}'s so far static void _ECHO_CANDIDATE(){ diff --git a/source/main.cpp b/source/main.cpp index e6c41d2..fa43f6d 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -24,6 +24,8 @@ DECLARE_LEXER(csml); DECLARE_LEXER(xml); std::vector ignore_list; +int ignore_count = 1; +int ignore_i = 1; const char DEFAULT_QUOTE = '\''; char quote = DEFAULT_QUOTE; diff --git a/source/scanner.hpp b/source/scanner.hpp index 2e4fd2b..0a9559a 100644 --- a/source/scanner.hpp +++ b/source/scanner.hpp @@ -17,5 +17,8 @@ bool do_ignore(const std::string ¤t_tag) { != ignore_list.end(); } +extern int ignore_count; // number of '{' / '}'s to be placed around the current ignored block +extern int ignore_i; // number of '}'s so far + #define SCANNER_H #endif diff --git a/source/xml.l b/source/xml.l index 33d5e06..8fa73d5 100644 --- a/source/xml.l +++ b/source/xml.l @@ -7,8 +7,6 @@ bool is_comment_multiline = false; unsigned long long comment_begining; std::string current_tag; long ignore_start; -static int ignore_count = 1; -static int ignore_i = 1; unsigned long long cursor_position = 0; #define YY_USER_ACTION cursor_position += yyleng;