From f68e177e0266781deb34f306cfd3f8c189c4def2 Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Thu, 24 Mar 2022 14:47:20 +0100 Subject: [PATCH] Bare specs of the context_mngr.py --- src/bootstraparse/modules/context_mngr.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/bootstraparse/modules/context_mngr.py b/src/bootstraparse/modules/context_mngr.py index c30b385..e3fb1ee 100644 --- a/src/bootstraparse/modules/context_mngr.py +++ b/src/bootstraparse/modules/context_mngr.py @@ -1 +1,18 @@ # Interprets where the parser is located and resolves errors +class BaseContainer: + pass + # Must define __init__, __str__, __repr__ and a print_all method + # will contain all sub-tokens and/or sub-containers + # Defines a method to get all token elements (__iter__) and a method to get a specific element (__getitem__) + # Defines a method to get the number of elements (__len__) + # Defines a method to get the name of the container (__name__) + # Defines a method to the optionals inside the container ( ? .optional()) + +# Define containers all the Enhanced text elements, divs, headers, list and any element that can be a container + + +class ContextManager: + pass +# Defines all methods to manage the context of the parser as a file is being parsed +# Builds all containers as the parser is parsing the file +