Title: Rewrite Variable Logic From Scratch · Issue #137 · PowerShell/EditorSyntax · GitHub
Open Graph Title: Rewrite Variable Logic From Scratch · Issue #137 · PowerShell/EditorSyntax
X Title: Rewrite Variable Logic From Scratch · Issue #137 · PowerShell/EditorSyntax
Description: There are multiple issues with variables as they stand now in the grammar some of which have been reported and some of which haven't: Punctuation in variables with properties and methods isn't scoped correctly: #131 The sigil for a sub-e...
Open Graph Description: There are multiple issues with variables as they stand now in the grammar some of which have been reported and some of which haven't: Punctuation in variables with properties and methods isn't scop...
X Description: There are multiple issues with variables as they stand now in the grammar some of which have been reported and some of which haven't: Punctuation in variables with properties and methods isn...
Opengraph URL: https://github.com/PowerShell/EditorSyntax/issues/137
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Rewrite Variable Logic From Scratch","articleBody":"There are multiple issues with variables as they stand now in the grammar some of which have been reported and some of which haven't:\r\n\r\n* Punctuation in variables with properties and methods isn't scoped correctly: #131 \r\n* The sigil for a sub-expression is not handled the same way as the sigil on a variable: #132 \r\n* Some language variables like `$_`, `$$`, `$?` are treated differently depending on context and are currently scoped incorrectly: #133 \r\n* Properties and method highlighting breaks when the variable has an array position specified: #127 \r\n* Multiple legal characters break variable highlighting (`$Var?Iable`), and special automatic variables like `$\u003cdrive letter>:folder` don't highlight correctly: #49\r\n\r\nThere are also questions about the correct scope of properties and methods (mentioned #131) and questions about to what extent the grammar should be concerned with user expectation/\"most themes\" vs either correctness (subjective) or consistency (with which languages?) (#130 and #129).\r\n\r\n# Background\r\n\r\nThe following cases need to be covered with as little repetition / complexity as possible:\r\n\r\n* Regular variables with and without scopes, properties, array position, methods, etc.\r\n* Variables contained within strings.\r\n* Variables contained within sub-expressions with and without scopes, properties, array position, methods, etc.\r\n* Variables in and out of strings and sub-expressions when using the `${Variable}` format again with and without scopes, properties, array position, methods, etc.\r\n\r\nThe following gotchas need to be taken in to account:\r\n\r\n* Which special characters are legal within `${Variable}` syntax vs `$Variable` syntax.\r\n* International characters (`\\p{L}` vs [A-z]`).\r\n* Access of variables through splatting where the sigil is `@`.\r\n* Separate scoping for constants, automatic variables, language variables, etc.\r\n* `$$` where `\"$$Hello\"` needs to show `$$` as the variable and `Hello` as part of the double quoted string and other similar oddities.\r\n* Lots of others...\r\n\r\n# Planned Format/Rules\r\n\r\n??? tbd\r\n\r\nRe: Scope selection -> See #138","author":{"url":"https://github.com/omniomi","@type":"Person","name":"omniomi"},"datePublished":"2018-08-16T20:02:19Z","url":"https://github.com/PowerShell/EditorSyntax/issues/137"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:cca10cbc-6910-03d9-ec99-5f2e9b62d065 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AF08:1B3549:CCDEE:122D10:6AFE1434 |
| html-safe-nonce | 0db168892a5de092b7238e51092ddfa11c41ecd11d8e5953b537cea14fe29590 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRjA4OjFCMzU0OTpDQ0RFRToxMjJEMTA6NkFGRTE0MzQiLCJ2aXNpdG9yX2lkIjoiOTIzODc1MDc5NTA5MzgyMTk2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | e70b0e3bf5ac122d956df60a3c757a7298b9dfb6fcd2770cea61e16a913266fc |
| hovercard-subject-tag | issue:351348457 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/EditorSyntax/137/issue_layout |
| twitter:image | https://opengraph.githubassets.com/584e29498de4fd6a15bc2b51e7741939d6d325f9918071cab1fe3949e0de14e8/PowerShell/EditorSyntax/issues/137 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/584e29498de4fd6a15bc2b51e7741939d6d325f9918071cab1fe3949e0de14e8/PowerShell/EditorSyntax/issues/137 |
| og:image:alt | There are multiple issues with variables as they stand now in the grammar some of which have been reported and some of which haven't: Punctuation in variables with properties and methods isn't scop... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | omniomi |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3cd8a1d79ccbf9aecac62781f79072482a49047fb982b8c9e2ad4aca8bf6a9af |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/EditorSyntax git https://github.com/PowerShell/EditorSyntax.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 59601299 |
| octolytics-dimension-repository_nwo | PowerShell/EditorSyntax |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 59601299 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/EditorSyntax |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 05539640a34afe6142a519483d78ddd766a1304a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width