semantic/parser/parser_types.rs
1// SPDX-License-Identifier: Apache-2.0
2//! Parsed AST data types.
3
4/// A function definition.
5#[derive(Clone, Debug, PartialEq)]
6pub struct FunctionDef {
7 pub name: String,
8 pub signature: String,
9 pub start_line: usize,
10 pub end_line: usize,
11 pub content: String,
12}
13
14/// An import statement.
15#[derive(Clone, Debug, PartialEq)]
16pub struct Import {
17 pub raw: String,
18 pub kind: ImportKind,
19}
20
21/// Type of import.
22#[derive(Clone, Debug, PartialEq)]
23pub enum ImportKind {
24 Use,
25 ExternCrate,
26 Require,
27 Import,
28}