| 1 |
//! Disabled support for the component model. |
| 2 |
|
| 3 |
use crate::parser::{Parse, Parser, Result}; |
| 4 |
use crate::token::{Id, Span}; |
| 5 |
|
| 6 |
/// Empty definition of a component that cannot be created. |
| 7 |
#[derive(Debug)] |
| 8 |
pub struct Component<'a> { |
| 9 |
/// Where this `component` was defined |
| 10 |
pub span: Span, |
| 11 |
/// An optional identifier this component is known by |
| 12 |
pub id: Option<Id<'a>>, |
| 13 |
} |
| 14 |
|
| 15 |
impl<'a> Parse<'a> for Component<'a> { |
| 16 |
fn parse(parser: Parser<'a>) -> Result<Self> { |
| 17 |
Err(parser.error("support for parsing components disabled at compile time")) |
| 18 |
} |
| 19 |
} |