javascript/ractive.js
function getConditional ( parser ) {
  	var start, expression, ifTrue, ifFalse;

  	expression = readLogicalOr$1( parser );
  	if ( !expression ) {
  		return null;
  	}

  	start = parser.pos;

  	parser.allowWhitespace();

  	if ( !parser.matchString( '?' ) ) {
  		parser.pos = start;
  		return expression;
  	}

  	parser.allowWhitespace();

  	ifTrue = readExpression( parser );
  	if ( !ifTrue ) {
  		parser.error( expectedExpression );
  	}

  	parser.allowWhitespace();

  	if ( !parser.matchString( ':' ) ) {
  		parser.error( 'Expected ":"' );
  	}

  	parser.allowWhitespace();

  	ifFalse = readExpression( parser );
  	if ( !ifFalse ) {
  		parser.error( expectedExpression );
  	}

  	return {
  		t: CONDITIONAL,
  		o: [ expression, ifTrue, ifFalse ]
  	};
  }
function getConditional ( parser ) {
  	var start, expression, ifTrue, ifFalse;

  	expression = readLogicalOr$1( parser );
  	if ( !expression ) {
  		return null;
  	}

  	start = parser.pos;

  	parser.allowWhitespace();

  	if ( !parser.matchString( '?' ) ) {
  		parser.pos = start;
  		return expression;
  	}

  	parser.allowWhitespace();

  	ifTrue = readExpression( parser );
  	if ( !ifTrue ) {
  		parser.error( expectedExpression );
  	}

  	parser.allowWhitespace();

  	if ( !parser.matchString( ':' ) ) {
  		parser.error( 'Expected ":"' );
  	}

  	parser.allowWhitespace();

  	ifFalse = readExpression( parser );
  	if ( !ifFalse ) {
  		parser.error( expectedExpression );
  	}

  	return {
  		t: CONDITIONAL,
  		o: [ expression, ifTrue, ifFalse ]
  	};
  }
function getConditional ( parser ) { var start , expression , ifTrue , ifFalse ; expression = readLogicalOr$1 ( parser ) ; if ( ! expression ) { return null ; } start = parser . pos ; parser . allowWhitespace ( ) ; if ( ! parser . matchString ( '?' ) ) { parser . pos = start ; return expression ; } parser . allowWhitespace ( ) ; ifTrue = readExpression ( parser ) ; if ( ! ifTrue ) { parser . error ( expectedExpression ) ; } parser . allowWhitespace ( ) ; if ( ! parser . matchString ( ':' ) ) { parser . error ( 'Expected ":"' ) ; } parser . allowWhitespace ( ) ; ifFalse = readExpression ( parser ) ; if ( ! ifFalse ) { parser . error ( expectedExpression ) ; } return { t : CONDITIONAL , o : [ expression , ifTrue , ifFalse ] } ; }
The conditional operator is the lowest precedence operator, so we start here
The conditional operator is the lowest precedence operator so we start here