Changeset 21b0013 in mainline for uspace/app/bdsh/tok.c


Ignore:
Timestamp:
2021-08-08T12:57:21Z (3 years ago)
Author:
Manuele Conti <manuele.conti@…>
Children:
932c640
Parents:
a106037
Message:

Start adding bdsh full pipes support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/tok.c

    ra106037 r21b0013  
    138138                                return rc;
    139139                        }
    140                 } else if (next_char == '\'') {
     140                } else if (next_char == '<') {
     141                        if (tok_pending_chars(tok)) {
     142                                rc = tok_push_token(tok);
     143                                if (rc != EOK) {
     144                                        return rc;
     145                                }
     146                        }
     147
     148                        tok_start_token(tok, TOKTYPE_RDIN);
     149
     150                        rc = tok_push_char(tok, tok_get_char(tok));
     151                        if (rc != EOK) {
     152                                return rc;
     153                        }
     154                        tok_get_char(tok);
     155                        rc = tok_push_token(tok);
     156                        if (rc != EOK) {
     157                                return rc;
     158                        }
     159                } else if (next_char == '>') {
     160                        if (tok_pending_chars(tok)) {
     161                                rc = tok_push_token(tok);
     162                                if (rc != EOK) {
     163                                        return rc;
     164                                }
     165                        }
     166
     167                        tok_start_token(tok, TOKTYPE_RDOU);
     168
     169                        rc = tok_push_char(tok, tok_get_char(tok));
     170                        if (rc != EOK) {
     171                                return rc;
     172                        }
     173                        tok_get_char(tok);
     174                        rc = tok_push_token(tok);
     175                        if (rc != EOK) {
     176                                return rc;
     177                        }
     178                }  else if (next_char == '\'') {
    141179                        /*
    142180                         * A string starts with a quote (') and ends again with a quote.
Note: See TracChangeset for help on using the changeset viewer.