(function(mod) {
  if (typeof exports == "object" && typeof module == "object") // CommonJS
    mod(require("../../lib/codemirror"), require("../../mode/askiascript/askiascript"));
  else if (typeof define == "function" && define.amd) // AMD
    define(["../../lib/codemirror", "../../mode/askiascript/askiascript"], mod);
  else // Plain browser env
    mod(CodeMirror);
})(function defineLexical(CodeMirror) {
  "use strict";

var askiaScript = CodeMirror.askiaScript;

askiaScript.extend(askiaScript.types, {
    "HTTPRESPONSE" : "httpresponse"
});

askiaScript.extend(askiaScript.i18n, {
    "types" : {
        "httpresponse" : "HttpResponse"
    },    
    "core" : {
        "httpresponse" : {
            "ns" : "masquewslanguage",            
            "desc" : "\tObject which contains all information of the response of a query web service routing.",            
            "remarks" : "\tThis variable is on the local scope, so it's available only in the Response success or error of a query web service routing.",            
            "examples" : [
                "\tCurrentHttpResponse.Body ' => \"18/10/2017\"",                
                "\t"
            ],            
            "version" : "5.4.8.0"
        }
    }
}, true);

askiaScript.extend(askiaScript.lexical, {
    "namespaces" : {
        "masquewslanguage" : {
            "name" : "MasqueWSLanguage",            
            "ns" : "masquewslanguage",            
            "dependencies" : [
                "masquelanguage"
            ]
        }
    },    
    "builtin" : [
        {
            "name" : "CurrentHttpResponse",            
            "ns" : "masquewslanguage",            
            "base" : "const",            
            "type" : "httpresponse",            
            "desc" : "Object used to obtain information about the current browser identity, resolution and capabilities.",            
            "remarks" : "This variable is on the local scope, so it's available only in the Response success or error of a query web service routing.",            
            "examples" : "CurrentHttpResponse.Body ' => \"18/10/2017\"",            
            "version" : "5.4.8.0"
        }
    ],    
    "members" : {
        "question" : [
            {
                "name" : "SetValue",                
                "ns" : "masquewslanguage",                
                "base" : "method",                
                "type" : "question",                
                "args" : [
                    {
                        "name" : "value",                        
                        "type" : "anytype",                        
                        "desc" : "to set"
                    }
                ],                
                "desc" : "\tSets a value to a question",                
                "examples" : [
                    "\tage.SetValue(21) ' => Set age to 21",                    
                    "\tgender.SetValue(2) ' => set to female",                    
                    "\tnewspapers.SetValue({1;5}) ' => set a set",                    
                    "\tname.SetValue(\"Peter Holmes\") ' => set a string",                    
                    "\ttoday.SetValue(#10/3/1999#) ' => set to female",                    
                    "\trating.Iteration(3).SetValue(2) => set a question within a loop"
                ],                
                "version" : "5.4.1.0"
            }
        ],        
        "httpresponse" : [
            {
                "name" : "Body",                
                "ns" : "masquewslanguage",                
                "base" : "property",                
                "type" : "string",                
                "desc" : "\treturns the body of the response as string.",                
                "examples" : "\tCurrentHttpResponse.Body ' => \"18/8/2017\"",                
                "version" : "5.4.8.0"
            },            
            {
                "name" : "headers",                
                "ns" : "masquewslanguage",                
                "base" : "property",                
                "type" : "dictionary",                
                "desc" : "\treturns the list of headers as a dictionary (key, value). If a key has a duplicate (eg set-cookie), the value will be an array",                
                "examples" : "\tCurrentHttpResponse.Headers.Get(\"input\") ' => \"data\"",                
                "version" : "5.4.8.0"
            },            
            {
                "name" : "StatusCode",                
                "ns" : "masquewslanguage",                
                "base" : "property",                
                "type" : "number",                
                "desc" : "\treturns the status code (200 for success, 404 for not found) of the http response",                
                "examples" : "\tCurrentHttpResponse.StatusCode ' => 200",                
                "version" : "5.4.8.0"
            }
        ]
    }
}, true);

});
