lastops / sublime-cfengine Goto Github PK
View Code? Open in Web Editor NEWCFEngine language highlighting for Sublime Text
License: Other
CFEngine language highlighting for Sublime Text
License: Other
Hello,
I would love to have a cfengine syntax on github. An the syntax you are using for sublime text is accepted by github for their highlighter.
However, they need a proper license before we can submit it.
Can you give an opensource license to this project ?
Thank you,
peckpeck
Your highlighter is a great start, but there are quite a few missing keywords.
In 3.6 we added a syntax map dump to cf-promises
--syntax-description, -s value - Output a document describing the available syntax elements of CFEngine. Possible values: 'none', 'json'. Default is 'none'.
I started playing around with parsing that. Perhaps we could use it to automatically generate a more complete syntax highlighter.
Here is my experiment so far.
#!/usr/bin/env python
import json
from pprint import pprint
seperator="|"
json_data = open('syntaxmap.json');
data = json.load(json_data)
attributes = []
for promiseType in data['promiseTypes']:
print promiseType
for attribute in data['promiseTypes'][promiseType]['attributes']:
attributes.append(attribute)
attributes=list(set(attributes))
attributes.sort()
#print data["functions"]
functions = []
for function in data['functions']:
functions.append(function)
functions.sort()
cfengine_keywords = attributes + functions
cfengine_keywords.sort()
for each in cfengine_keywords:
print each
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.