{"action":"created","issue":{"url":"https://api.github.com/repos/davidshepherd7/electric-operator/issues/22","labels_url":"https://api.github.com/repos/davidshepherd7/electric-operator/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/davidshepherd7/electric-operator/issues/22/comments","events_url":"https://api.github.com/repos/davidshepherd7/electric-operator/issues/22/events","html_url":"https://github.com/davidshepherd7/electric-operator/issues/22","id":107399446,"number":22,"title":"Multiplication by a pointer dereference is interpreted as a pointer to pointer","user":{"login":"Dickby","id":10100765,"avatar_url":"https://avatars.githubusercontent.com/u/10100765?v=3","gravatar_id":"","url":"https://api.github.com/users/Dickby","html_url":"https://github.com/Dickby","followers_url":"https://api.github.com/users/Dickby/followers","following_url":"https://api.github.com/users/Dickby/following{/other_user}","gists_url":"https://api.github.com/users/Dickby/gists{/gist_id}","starred_url":"https://api.github.com/users/Dickby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dickby/subscriptions","organizations_url":"https://api.github.com/users/Dickby/orgs","repos_url":"https://api.github.com/users/Dickby/repos","events_url":"https://api.github.com/users/Dickby/events{/privacy}","received_events_url":"https://api.github.com/users/Dickby/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-20T15:55:24Z","updated_at":"2015-10-14T12:33:43Z","closed_at":null,"body":"I found two problems with the handling of pointers in c-mode:\r\n\r\n1. In the definition of a pointer to a struct spaces are inserted.\r\nexample:\r\n`struct s * foo;`\r\ninstead of\r\n`struct s *foo`\r\nyou can't use `looking-back` for a struct keyword because it could be a typedef.\r\nmy suggestion is `looking-back` for an equals sign. If there is no equals sign, it should be the definition of a pointer.( I'm not totally shure) \r\n\r\n2. wrong spacing if a dereferenced pointer is used on the right side of an equation (not directly after equals sign).\r\nexample:\r\n`result = foo **bar`\r\ninstead of\r\n`result = foo * *bar;`\r\nif it is a division it will be  the beginning of a c comment.\r\n"},"comment":{"url":"https://api.github.com/repos/davidshepherd7/electric-operator/issues/comments/148035875","html_url":"https://github.com/davidshepherd7/electric-operator/issues/22#issuecomment-148035875","issue_url":"https://api.github.com/repos/davidshepherd7/electric-operator/issues/22","id":148035875,"user":{"login":"davidshepherd7","id":795860,"avatar_url":"https://avatars.githubusercontent.com/u/795860?v=3","gravatar_id":"","url":"https://api.github.com/users/davidshepherd7","html_url":"https://github.com/davidshepherd7","followers_url":"https://api.github.com/users/davidshepherd7/followers","following_url":"https://api.github.com/users/davidshepherd7/following{/other_user}","gists_url":"https://api.github.com/users/davidshepherd7/gists{/gist_id}","starred_url":"https://api.github.com/users/davidshepherd7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidshepherd7/subscriptions","organizations_url":"https://api.github.com/users/davidshepherd7/orgs","repos_url":"https://api.github.com/users/davidshepherd7/repos","events_url":"https://api.github.com/users/davidshepherd7/events{/privacy}","received_events_url":"https://api.github.com/users/davidshepherd7/received_events","type":"User","site_admin":false},"created_at":"2015-10-14T12:33:43Z","updated_at":"2015-10-14T12:33:43Z","body":"That might be a fix for 2., let me know if you come up with examples where it doesn't work.\r\n\r\nThe fix will actually make support for pointer-to-pointer types slightly worse unfortunately, because it now depends on the same type-detection heuristic as the normal pointer types."}}