if (locus == Linemap::unknown_location ())
{
locus = lexer.peek_token ()->get_locus ();
+
+ if (lexer.peek_token ()->get_id () == LEFT_SHIFT)
+ lexer.split_current_token (LEFT_ANGLE, LEFT_ANGLE);
+
+ // skip after somewhere?
if (!skip_token (LEFT_ANGLE))
- {
- // skip after somewhere?
- return AST::QualifiedPathType::create_error ();
- }
+ return AST::QualifiedPathType::create_error ();
}
// parse type (required)
case LEFT_SQUARE:
// slice type or array type - requires further disambiguation
return parse_slice_or_array_type ();
+ case LEFT_SHIFT:
case LEFT_ANGLE: {
// qualified path in type
AST::QualifiedPathInType path = parse_qualified_path_in_type ();
case LEFT_SQUARE:
// slice type or array type - requires further disambiguation
return parse_slice_or_array_type ();
+ case LEFT_SHIFT:
case LEFT_ANGLE: {
// qualified path in type
AST::QualifiedPathInType path = parse_qualified_path_in_type ();
return std::unique_ptr<AST::RangePatternBoundPath> (
new AST::RangePatternBoundPath (std::move (path)));
}
+ case LEFT_SHIFT:
case LEFT_ANGLE: {
// qualified path in expression
AST::QualifiedPathInExpression path
case LEFT_SQUARE:
// slice pattern
return parse_slice_pattern ();
+ case LEFT_SHIFT:
case LEFT_ANGLE: {
// qualified path in expression or qualified range pattern bound
AST::QualifiedPathInExpression path
* tokens and whatever. */
/* FIXME: could also be path expression (and hence macro expression,
* struct/enum expr) */
+ case LEFT_SHIFT:
case LEFT_ANGLE: {
// qualified path
// HACK: add outer attrs to path