Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 02dcb20 in mainline


Ignore:
Timestamp:
2012-06-27T20:32:59Z (8 years ago)
Author:
Sean Bartell <wingedtachikoma@…>
Branches:
master
Children:
349e510d
Parents:
600f5d1
Message:

Bithenge: add test files and comment support

Location:
uspace
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bithenge/script.c

    r600f5d1 r02dcb20  
    165165        if (ch == '\0') {
    166166                state->token = TOKEN_EOF;
     167        } else if (ch == '#') {
     168                while (state->buffer[state->buffer_pos] != '\n'
     169                    && state->buffer[state->buffer_pos] != '\0') {
     170                        state->buffer_pos++;
     171                        fill_buffer(state);
     172                }
     173                next_token(state);
     174                return;
    167175        } else if (isspace(ch)) {
    168176                // Will eventually reach the '\0' at the end
Note: See TracChangeset for help on using the changeset viewer.