src/parser.js
function pushData(entry, data, token) {
  if (entry.con === 2) {
    throw injectError(new Error('Finished pair cannot have more values'),
      token);
  }
  if (token) {
    data.line = token.line;
    data.column = token.column;
  }
  let wrappedData = wrapData(entry, data, token);
  if (entry.comment) {
    entry.comment = false;
    return;
  }
  if (entry.con === 1) {
    if (entry.tail == null) {
      // Welp, if tail is missing, head is missing too (of course)
      // I don't think this will ever be called..
      entry.head = entry.tail = new PairValue(null, wrappedData);
    } else {
      // If not, just attach the value.
      entry.tail.cdr = wrappedData;
    }
    entry.con = 2;
  } else {
    let pair = new PairValue(wrappedData, null);
    if (entry.tail == null) {
      // Welp, if tail is missing, head is missing too (of course)
      entry.head = entry.tail = pair;
    } else {
      // If not, just attach the value.
      entry.tail.cdr = pair;
      entry.tail = pair;
    }
  }
  if (token) {
    entry.head.line = token.line;
    entry.head.column = token.column;
  }
}
function pushData(entry, data, token) {
  if (entry.con === 2) {
    throw injectError(new Error('Finished pair cannot have more values'),
      token);
  }
  if (token) {
    data.line = token.line;
    data.column = token.column;
  }
  let wrappedData = wrapData(entry, data, token);
  if (entry.comment) {
    entry.comment = false;
    return;
  }
  if (entry.con === 1) {
    if (entry.tail == null) {
      // Welp, if tail is missing, head is missing too (of course)
      // I don't think this will ever be called..
      entry.head = entry.tail = new PairValue(null, wrappedData);
    } else {
      // If not, just attach the value.
      entry.tail.cdr = wrappedData;
    }
    entry.con = 2;
  } else {
    let pair = new PairValue(wrappedData, null);
    if (entry.tail == null) {
      // Welp, if tail is missing, head is missing too (of course)
      entry.head = entry.tail = pair;
    } else {
      // If not, just attach the value.
      entry.tail.cdr = pair;
      entry.tail = pair;
    }
  }
  if (token) {
    entry.head.line = token.line;
    entry.head.column = token.column;
  }
}
function pushData ( entry , data , token ) { if ( entry . con === 2 ) { throw injectError ( new Error ( 'Finished pair cannot have more values' ) , token ) ; } if ( token ) { data . line = token . line ; data . column = token . column ; } let wrappedData = wrapData ( entry , data , token ) ; if ( entry . comment ) { entry . comment = false ; return ; } if ( entry . con === 1 ) { if ( entry . tail == null ) { // Welp, if tail is missing, head is missing too (of course) // I don't think this will ever be called.. entry . head = entry . tail = new PairValue ( null , wrappedData ) ; } else { // If not, just attach the value. entry . tail . cdr = wrappedData ; } entry . con = 2 ; } else { let pair = new PairValue ( wrappedData , null ) ; if ( entry . tail == null ) { // Welp, if tail is missing, head is missing too (of course) entry . head = entry . tail = pair ; } else { // If not, just attach the value. entry . tail . cdr = pair ; entry . tail = pair ; } } if ( token ) { entry . head . line = token . line ; entry . head . column = token . column ; } }
Pushes the data into the stack entry. Note that this doesn't push the data into the stack..
Pushes the data into the stack entry . Note that this doesn t push the data into the stack ..