Merge pull request '(FEAT): Defined the structureNode classes for the node.' (#14) from feature/nodes-implementation into main
Reviewed-on: azpect/MarkdownToHtmlCompiler#14 Reviewed-by: shultzp1 <shultzp1@my.erau.edu>
This commit is contained in:
commit
4b973abf6c
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"C_Cpp.errorSquiggles": "disabled"
|
||||
}
|
||||
17
lib/inlindeNode.h
Normal file
17
lib/inlindeNode.h
Normal file
@ -0,0 +1,17 @@
|
||||
#ifndef INLINENODE_H
|
||||
#define INLINENODE_H
|
||||
#include "node.h"
|
||||
|
||||
class InlineNode : public Node{
|
||||
public:
|
||||
InlineNode(std::string content) : content(content);
|
||||
protected:
|
||||
std::string content;
|
||||
};
|
||||
|
||||
class TextNode : public InlineNode{};
|
||||
class BoldNode : public InlineNode{};
|
||||
class Italic : public InlineNode{};
|
||||
class BoldItalic : public InlineNode{};
|
||||
|
||||
#endif
|
||||
0
lib/inlineNode.cpp
Normal file
0
lib/inlineNode.cpp
Normal file
@ -1,4 +1,4 @@
|
||||
#include "./node.h"
|
||||
#include "node.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#include "./parser.h"
|
||||
#include "./util.h"
|
||||
#include "parser.h"
|
||||
#include "util.h"
|
||||
#include <cctype>
|
||||
#include <stdexcept>
|
||||
|
||||
|
||||
1
lib/structureNode.cpp
Normal file
1
lib/structureNode.cpp
Normal file
@ -0,0 +1 @@
|
||||
#include "structureNode.h"
|
||||
13
lib/structureNode.h
Normal file
13
lib/structureNode.h
Normal file
@ -0,0 +1,13 @@
|
||||
#ifndef STRUCTURENODE_H
|
||||
#define STRUCTURENODE_H
|
||||
|
||||
#include "node.h"
|
||||
|
||||
class StructureNode : public Node {};
|
||||
|
||||
class ListNode : public StructureNode {};
|
||||
class HeadingNode : public StructureNode {};
|
||||
class DocumentNode : public StructureNode {};
|
||||
class ParagraphNode : public StructureNode {};
|
||||
|
||||
#endif
|
||||
@ -1,4 +1,4 @@
|
||||
#include "./util.h"
|
||||
#include "util.h"
|
||||
|
||||
void removeTrailingWhitespace(std::string &input) {
|
||||
size_t start = input.find_first_not_of(" \t\n\r\f\v");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user