{"action":"created","issue":{"url":"https://api.github.com/repos/bamos/cpp-expression-parser/issues/28","repository_url":"https://api.github.com/repos/bamos/cpp-expression-parser","labels_url":"https://api.github.com/repos/bamos/cpp-expression-parser/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/bamos/cpp-expression-parser/issues/28/comments","events_url":"https://api.github.com/repos/bamos/cpp-expression-parser/issues/28/events","html_url":"https://github.com/bamos/cpp-expression-parser/pull/28","id":175865435,"number":28,"title":"Improve support to Map and Tuple","user":{"login":"VinGarcia","id":5884418,"avatar_url":"https://avatars.githubusercontent.com/u/5884418?v=3","gravatar_id":"","url":"https://api.github.com/users/VinGarcia","html_url":"https://github.com/VinGarcia","followers_url":"https://api.github.com/users/VinGarcia/followers","following_url":"https://api.github.com/users/VinGarcia/following{/other_user}","gists_url":"https://api.github.com/users/VinGarcia/gists{/gist_id}","starred_url":"https://api.github.com/users/VinGarcia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VinGarcia/subscriptions","organizations_url":"https://api.github.com/users/VinGarcia/orgs","repos_url":"https://api.github.com/users/VinGarcia/repos","events_url":"https://api.github.com/users/VinGarcia/events{/privacy}","received_events_url":"https://api.github.com/users/VinGarcia/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-08T21:10:30Z","updated_at":"2016-09-09T12:58:14Z","closed_at":"2016-09-09T12:58:08Z","pull_request":{"url":"https://api.github.com/repos/bamos/cpp-expression-parser/pulls/28","html_url":"https://github.com/bamos/cpp-expression-parser/pull/28","diff_url":"https://github.com/bamos/cpp-expression-parser/pull/28.diff","patch_url":"https://github.com/bamos/cpp-expression-parser/pull/28.patch"},"body":"The major changes are these 3:\r\n\r\n- Tuples now inherit from TokenList and are managed by the same garbage collector.\r\n- Map now have the built-in functions: pop() and len()\r\n- The map constructor now accepts Special Tuples, e.g.:\r\n\r\n```javascript\r\nmy_map = map('val1': 10, 'val2': 20, 'val3': 30)\r\nprint(my_map) // { \"val1\": 10, \"val2\": 20, \"val3\": 30 }\r\n```\r\n\r\nPlease note that these tuples will work as key-value arguments for any function. A lot like it does in Python with the operator `=`. So if you want to access the last argument of a function with many arguments you just need to write: `func('arg_name': 'arg_value')`.\r\n\r\nAlso if the key-value pair does not refer to an existing function argument it will be added to a built-in dictionary called: `kwargs` available inside the functions scope (much like the already implemented `args` that contains a list of extra arguments).\r\n\r\nBesides that, there is also some minor refactoring and bug-fixing.\r\n\r\nNext tasks:\r\n- Update README.md to contain all the new features.\r\n- Decouple the addition of new operations from the calculator class code.\r\n- Add built-in definition of dictionaries and lists with JSON syntax.\r\n- Add support for adhoc sub-parsers for reserved words, e.g. `new ...` or `function (...) {...}` etc."},"comment":{"url":"https://api.github.com/repos/bamos/cpp-expression-parser/issues/comments/245905271","html_url":"https://github.com/bamos/cpp-expression-parser/pull/28#issuecomment-245905271","issue_url":"https://api.github.com/repos/bamos/cpp-expression-parser/issues/28","id":245905271,"user":{"login":"bamos","id":707462,"avatar_url":"https://avatars.githubusercontent.com/u/707462?v=3","gravatar_id":"","url":"https://api.github.com/users/bamos","html_url":"https://github.com/bamos","followers_url":"https://api.github.com/users/bamos/followers","following_url":"https://api.github.com/users/bamos/following{/other_user}","gists_url":"https://api.github.com/users/bamos/gists{/gist_id}","starred_url":"https://api.github.com/users/bamos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bamos/subscriptions","organizations_url":"https://api.github.com/users/bamos/orgs","repos_url":"https://api.github.com/users/bamos/repos","events_url":"https://api.github.com/users/bamos/events{/privacy}","received_events_url":"https://api.github.com/users/bamos/received_events","type":"User","site_admin":false},"created_at":"2016-09-09T12:58:14Z","updated_at":"2016-09-09T12:58:14Z","body":"Thanks!"}}
{"actor":{"display_login":"bamos"}}