GithubHelp home page GithubHelp logo

sublime-cfengine's People

Contributors

astraverkhau avatar nickanderson avatar pwbennett avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

sublime-cfengine's Issues

Missing license

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

Lots of missing keywords, can we automate the generation of the highlighter spec?

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.