asm.st - enscript - GNU Enscript
 (HTM) git clone git://thinkerwim.org/enscript.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
       asm.st (823B)
       ---
            1 /**
            2  * Name: asm
            3  * Description: Assembler listings.
            4  * Author: Markku Rossi <mtr@iki.fi>
            5  */
            6 
            7 state asm extends HighlightEntry
            8 {
            9   /* Comments. */
           10   /(;|^[ \t]*;).*/ {
           11     comment_face (true);
           12     language_print ($0);
           13     call (eat_one_line);
           14     comment_face (false);
           15   }
           16 
           17   /* Labels are averything at the beginning of the line, ending to ':' */
           18   /^[^\t ]+:/ {
           19     function_name_face (true);
           20     language_print ($0);
           21     function_name_face (false);
           22   }
           23 
           24   /* Asm operands are indented. */
           25   /^([ \t]+)([^ \t]+)/ {
           26     language_print ($1);
           27 
           28     keyword_face (true);
           29     language_print ($2);
           30     keyword_face (false);
           31   }
           32 
           33   /* And finally, highlight string constants. */
           34   /\"/ {
           35     string_face (true);
           36     language_print ($0);
           37     call (c_string);
           38     string_face (false);
           39   }
           40 }
           41 
           42 
           43 /*
           44 Local variables:
           45 mode: c
           46 End:
           47 */