aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexers/LexAsm.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'lexers/LexAsm.cxx')
-rw-r--r--lexers/LexAsm.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/lexers/LexAsm.cxx b/lexers/LexAsm.cxx
index b327ce5f2..37a4efe35 100644
--- a/lexers/LexAsm.cxx
+++ b/lexers/LexAsm.cxx
@@ -150,8 +150,10 @@ class LexerAsm : public ILexer {
WordList directives4foldend;
OptionsAsm options;
OptionSetAsm osAsm;
+ int commentChar;
public:
- LexerAsm() {
+ LexerAsm(int commentChar_) {
+ commentChar = commentChar_;
}
virtual ~LexerAsm() {
}
@@ -183,7 +185,11 @@ public:
}
static ILexer *LexerFactoryAsm() {
- return new LexerAsm();
+ return new LexerAsm(';');
+ }
+
+ static ILexer *LexerFactoryAs() {
+ return new LexerAsm('#');
}
};
@@ -342,7 +348,7 @@ void SCI_METHOD LexerAsm::Lex(unsigned int startPos, int length, int initStyle,
// Determine if a new state should be entered.
if (sc.state == SCE_ASM_DEFAULT) {
- if (sc.ch == ';'){
+ if (sc.ch == commentChar){
sc.SetState(SCE_ASM_COMMENT);
} else if (IsASCII(sc.ch) && (isdigit(sc.ch) || (sc.ch == '.' && IsASCII(sc.chNext) && isdigit(sc.chNext)))) {
sc.SetState(SCE_ASM_NUMBER);
@@ -457,4 +463,5 @@ void SCI_METHOD LexerAsm::Fold(unsigned int startPos, int length, int initStyle,
}
LexerModule lmAsm(SCLEX_ASM, LexerAsm::LexerFactoryAsm, "asm", asmWordListDesc);
+LexerModule lmAs(SCLEX_AS, LexerAsm::LexerFactoryAs, "as", asmWordListDesc);