This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@rebarconfigscript "rebar.config.script" | |
@doc """ | |
Loads the rebar.config and evaluates rebar.config.script if it | |
exists in the given directory. | |
""" | |
def load_config(dir) do | |
config_path = Path.join(dir, "rebar.config") | |
script_path = Path.join(dir, @rebarconfigscript) | |
config = case :file.consult(config_path) do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for lbrace, rbrace, name, in ('\\{', '\\}', 'cb'), \ | |
('\\[', '\\]', 'sb'), \ | |
('\\(', '\\)', 'pa'), \ | |
('\\<', '\\>', 'lt'): | |
states['strings'] += [ | |
(r'%[a-z]' + lbrace + r'(?<!\w)\?(\\(x\d{1,2}|\h{1,2}(?!\h)\b|0[0-7]{0,2}(?![0-7])\b|' | |
r'[^x0MC])|(\\[MC]-)+\w|[^\s\\])', | |
String.Double, name + 'intp'), | |
(r'%[A-Z]' + lbrace, String.Double, name + 'no-intp') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.json.JSONArray; | |
import org.json.JSONException; | |
import org.json.JSONObject; | |
import java.util.*; | |
public class JsonHelper { | |
public static Object toJSON(Object object) throws JSONException { | |
if (object instanceof Map) { | |
JSONObject json = new JSONObject(); |
NewerOlder