|
1 | 1 | use std::collections::HashMap; |
2 | 2 |
|
3 | 3 | use rusty_common::Positioned; |
4 | | -use rusty_parser::{BareName, BuiltInStyle, Name, TypeQualifier}; |
| 4 | +use rusty_parser::{BareName, TypeQualifier}; |
5 | 5 |
|
6 | | -/// Holds the resolved name of a subprogram. |
7 | | -#[derive(Clone, Debug, Eq, Hash, PartialEq)] |
8 | | -pub enum SubprogramName { |
9 | | - /// The resolved qualified name of a function. |
10 | | - Function(Name), |
11 | | - |
12 | | - /// The resolved name of a sub. |
13 | | - Sub(BareName), |
14 | | -} |
15 | | - |
16 | | -#[derive(Clone, Copy, Debug, Eq, PartialEq)] |
17 | | -pub enum NameContext { |
18 | | - Global, |
19 | | - Sub, |
20 | | - Function, |
21 | | -} |
22 | | - |
23 | | -/// A resolved parameter type. |
24 | | -#[derive(PartialEq)] |
25 | | -pub enum ResolvedParamType { |
26 | | - /// A built-in type. |
27 | | - /// The type qualifier indicates the type. |
28 | | - /// The style indicates how the parameter was declared: |
29 | | - /// Compact: e.g. `A$` or Extended e.g. `A AS STRING` |
30 | | - BuiltIn(TypeQualifier, BuiltInStyle), |
31 | | - |
32 | | - /// A user defined type. |
33 | | - UserDefined(BareName), |
34 | | - |
35 | | - /// An array type. |
36 | | - /// Dimensions are not allowed for parameter types. |
37 | | - Array(Box<Self>), |
38 | | -} |
39 | | - |
40 | | -/// A collection of resolved parameter types. |
41 | | -pub type ResolvedParamTypes = Vec<ResolvedParamType>; |
| 6 | +use crate::core::ResolvedParamTypes; |
42 | 7 |
|
43 | 8 | /// The signature of a FUNCTION or SUB. |
44 | 9 | /// Consists of the resolved parameter types and, in case of a FUNCTION, the return type. |
|
0 commit comments