Hi! I wrote a lexer in xml for Javascript and added it to the lexers folder. When loading, Codeblocks says: "Scanning for lexers in C:\OJI\CodeBlocks\share\codeblocks/lexers/...
Found 47 lexers" and starts enumerating then, but when it reaches lexer_javascript is also prints
"failed
TinyXML Error: Error document empty"
Due to my instalation of codeblocks, I was not able to find any scintilla folder (My school teacher gave me the link to install a kit that contained codeblocks) so I used index 64 instead for the lexer. But I don't think that is what causes the error.
How can I fix it? This is my xml file:
<?xml version="1.0" ?>
<!DOCTYPE CodeBlocks_lexer_properties (View Source for full doctype...)>
- <CodeBlocks_lexer_properties>
- <Lexer name="Javascript" index="64" filemasks="*.js, *.ts">
<Style name="Default" index="0" fg="0,0,0" bg="255,255,255" bold="0" italics="0" underlined="0" />
<Style name="Comment" index="18" fg="180,180,180" />
<Style name="Line Comment" index="11" fg="180,180,180" />
<Style name="Doc comment" index="22" fg="0,127,0" bold="1" />
<Style name="Number" index="123" fg="0,0,127" />
<Style name="Word" index="7" fg="0,0,0" />
<Style name="Keyword" index="1" fg="0,0,127" bold="1" />
<Style name="Double quoted string" index="44" fg="74,119,67" />
<Style name="Single quoted string" index="55" fg="74,119,67" />
<Style name="Symbols" index="50" fg="127,0,0" bold="1" />
<Style name="EOL" index="51" bg="180,180,0" />
<Style name="RegEx" index="52" fg="255,230,50" />
<Style name="Constructors/Capital letter Functions" index="9" fg="0,191,255" />
<Style name="Global objects" index="5" fg="0,149,148" />
- <Keywords>
<Set index="1" value="abstract as boolean break byte case catch char class const continue debugger default delete do double else enum export extends false final finally float for from function goto if implements import in instanceof int interface long native new null package private protected public return short static super switch synchronized this throw throws transient true try typeof var void volatile while with" />
<Set index="9" value="Number String Boolean Array Object Function Symbol RegExp Math UInt8Array Worker Atomics [A-Z]\w+" />
<Set index="5" value="" />
</Keywords>
<SampleCode value="lexer_javascript.sample" breakpoint_line="20" debug_line="22" error_line="23" />
</Lexer>
</CodeBlocks_lexer_properties>
(It's not finnished yet)
Are these '-' characters really there? At the start of 3 lines?
Have you tried if a xml validator will accept your file?
No, those '-' are not there. I just copied and pasted the rendering of the xml file. (It renders, so I guess it's valid)
Please upload the whole file. It could be an encoding problem...
Also, what is the exact location of this file?
You must remove the text in parentheses, change:
<!DOCTYPE CodeBlocks_lexer_properties (View Source for full doctype...)>
to:
<!DOCTYPE CodeBlocks_lexer_properties>
because DOCTYPE only accepts PUBLIC or SYSTEM keywords after the name
I do not have that part (between the paranthesis) nor the hyphens in the source file. That was just the rendering. I will edit the question
It looks like I can't edit the question :(
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F (http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F)
The link says how to use code tags.
Tim S.