Skip to content

Commit 6b3fe21

Browse files
authored
add pdl highlighter
1 parent 34abcac commit 6b3fe21

File tree

2 files changed

+10
-31
lines changed

2 files changed

+10
-31
lines changed

PDL/example.pdl

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
# https://macromates.com/manual/en/language_grammars
33
# https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide
44

5-
{food} # food class
6-
pizza = 'Peporoni' # pizza variable within food class
7-
bread = 'rye' # bread variable within food class
8-
cheese = 'mozzarella' # cheese variable within food class
9-
bread - cheeese = pizza # releationship combining bread and cheese to make pizza
5+
food {
6+
pizza = 'Peporoni' # pizza variable within food class
7+
bread = 'rye' # bread variable within food class
8+
cheese = 'mozzarella' # cheese variable within food class
9+
}
1010

11-
{class2}
12-
variable = '1N'
11+
class2 {
12+
variable = '1N'
13+
}

PDL/parser/PDLparser.py

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,5 @@
22
import requests
33
from sys import platform
44

5-
def filterFile(file, blklistword):
6-
with open(file, "r+") as fin:
7-
content = fin.read()
8-
if content.find(blklistword) is True:
9-
writeIteam = content.replace(blklistword, "")
10-
fin.write(writeIteam)
11-
fin.close()
12-
else:
13-
pass
14-
15-
def extractList(file):
16-
with open(file, "r") as f:
17-
data = f.read()
18-
splitData = data.split('\n')
19-
f.close()
20-
21-
print(splitData)
22-
return splitData
23-
24-
def CC():
25-
if platform == "linux" or platform == "linux2":
26-
os.system("clear")
27-
else:
28-
os.system("cls")
5+
def parsePDL(file):
6+
with open

0 commit comments

Comments
 (0)