Skip to content

Commit ca3d744

Browse files
committed
chore(ast): ast type improvements
1 parent 358537c commit ca3d744

File tree

2 files changed

+38
-8
lines changed

2 files changed

+38
-8
lines changed

roxas/ast.cc

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright (c) Jahan Addison
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
#include <iostream>
217
#include <roxas/ast.h>
318

roxas/ast.h

+23-8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright (c) Jahan Addison
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
#pragma once
217

318
#include <memory>
@@ -34,22 +49,22 @@ class Abstract_Syntax_Tree
3449

3550
enum class literal : int
3651
{
37-
NUMBER,
38-
CONSTANT,
39-
STRING,
40-
UNKNOWN
52+
Number,
53+
Constant,
54+
String,
55+
Unknown
4156
};
4257

4358
struct definition
4459
{
4560
enum class type : int
4661
{
47-
FUNCTION,
48-
VECTOR,
49-
UNKNOWN
62+
Function,
63+
Vector,
64+
Unknown
5065
};
5166

52-
type type{ type::UNKNOWN };
67+
type type{ type::Unknown };
5368
std::vector<node> children{};
5469
};
5570

0 commit comments

Comments
 (0)