Initial Parser
This commit is contained in:
parent
f8853d022b
commit
fc0d9137a5
18
headers/Parser.h
Normal file
18
headers/Parser.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <vector>
|
||||||
|
#include "Lexer.h"
|
||||||
|
#include "Expression.h"
|
||||||
|
#include "TypeWrapper.h"
|
||||||
|
|
||||||
|
class Parser
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
const std::vector<Token> tokens;
|
||||||
|
int current = 0;
|
||||||
|
|
||||||
|
public:
|
||||||
|
Parser(std::vector<Token> tokens) : tokens(tokens){};
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::shared_ptr<Expr<Object>> expression();
|
||||||
|
};
|
||||||
@ -1,14 +0,0 @@
|
|||||||
|
|
||||||
#include <string>
|
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
class Test
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
std::string message;
|
|
||||||
|
|
||||||
Test(std::string msg);
|
|
||||||
|
|
||||||
public:
|
|
||||||
void Hello();
|
|
||||||
};
|
|
||||||
8
source/Parser.cpp
Normal file
8
source/Parser.cpp
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
//
|
||||||
|
// Created by Bobby Lucero on 5/26/23.
|
||||||
|
//
|
||||||
|
#include "../headers/Parser.h"
|
||||||
|
|
||||||
|
std::shared_ptr<Expr<Object> > Parser::expression() {
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,9 +0,0 @@
|
|||||||
#include "../headers/test.h"
|
|
||||||
|
|
||||||
Test::Test(std::string msg){
|
|
||||||
this->message = msg;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Test::Hello(){
|
|
||||||
std::cout << this->message << std::endl;
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user