Renamed .cc to .ccl
This commit is contained in:
parent
ad10bc0357
commit
f6642f834b
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@ -22,7 +22,7 @@
|
|||||||
"program": "cc_lang_interpreter/main.py",
|
"program": "cc_lang_interpreter/main.py",
|
||||||
"console": "integratedTerminal",
|
"console": "integratedTerminal",
|
||||||
"args": [
|
"args": [
|
||||||
"First.cc"
|
"First.ccl"
|
||||||
],
|
],
|
||||||
"env": {
|
"env": {
|
||||||
"PYTHONPATH": "${workspaceFolder}/src/:${workspaceFolder}/venv/bin/python"
|
"PYTHONPATH": "${workspaceFolder}/src/:${workspaceFolder}/venv/bin/python"
|
||||||
|
@ -34,7 +34,7 @@ class Main:
|
|||||||
self.__utils.runtime_error(Error(ErrorCodes.FileNotFound))
|
self.__utils.runtime_error(Error(ErrorCodes.FileNotFound))
|
||||||
return
|
return
|
||||||
|
|
||||||
if not file.endswith('.cc'):
|
if not file.endswith('.ccl'):
|
||||||
self.__utils.runtime_error(Error(ErrorCodes.WrongFileType))
|
self.__utils.runtime_error(Error(ErrorCodes.WrongFileType))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ class Application(ApplicationABC):
|
|||||||
# r=root, d=directories, f=files
|
# r=root, d=directories, f=files
|
||||||
for r, d, f in os.walk(self._path):
|
for r, d, f in os.walk(self._path):
|
||||||
for file in f:
|
for file in f:
|
||||||
if file.endswith('.cc'):
|
if file.endswith('.ccl'):
|
||||||
self._read_file(os.path.join(r, file))
|
self._read_file(os.path.join(r, file))
|
||||||
|
|
||||||
def _read_file(self, file: str):
|
def _read_file(self, file: str):
|
||||||
@ -53,7 +53,7 @@ class Application(ApplicationABC):
|
|||||||
raise FileNotFoundError
|
raise FileNotFoundError
|
||||||
# self.__utils.runtime_error(Error(ErrorCodes.FileNotFound))
|
# self.__utils.runtime_error(Error(ErrorCodes.FileNotFound))
|
||||||
|
|
||||||
if not file.endswith('.cc'):
|
if not file.endswith('.ccl'):
|
||||||
raise Exception('Wrong file type')
|
raise Exception('Wrong file type')
|
||||||
# self.__utils.runtime_error(Error(ErrorCodes.WrongFileType))
|
# self.__utils.runtime_error(Error(ErrorCodes.WrongFileType))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user