Example #1
0
 private static bool CheckLabel(Token token, AsmContext context)
 {
     if (context.Queue.Count > 0) {
         var next = context.Queue.Peek();
         if (next.Type == TokenType.Colon) {
             context.Queue.Read();
             context.DefineLabel(token);
             return true;
         }
     }
     return false;
 }
Example #2
0
 private static bool CheckData(Token token, AsmContext context, AsmParser parser)
 {
     if (IsDataDirective(token)) {
         ProcessDataDirective(token, parser, context.CurrentSection);
         return true;
     }
     if (!context.Queue.IsEndOfLine) {
         var preview = context.Queue.Peek();
         if (IsDataDirective(preview)) {
             context.Queue.Read(TokenType.Literal);
             context.DefineLabel(token);
             ProcessDataDirective(preview, parser, context.CurrentSection);
             return true;
         }
     }
     return false;
 }