Search notes:

System.Management.Automation.PSParser (class)

$simpleScript = @'
  $x = 7
  $y = 6
  write-host $x*$y
'@

[System.Management.Automation.PSParseError[]] $errors = @()

$tokens = [System.Management.Automation.PSParser]::Tokenize($simpleScript, [ref] $errors)

if ($errors.count) {
   write-host 'statements contained errors'
   return
}

$tokens | format-table
#
#  Content               Type Start Length StartLine StartColumn EndLine EndColumn
#  -------               ---- ----- ------ --------- ----------- ------- ---------
#  x                 Variable     2      2         1           3       1         5
#  =                 Operator     5      1         1           6       1         7
#  7                   Number     7      1         1           8       1         9
#  ...                NewLine     8      1         1           9       2         1
#  y                 Variable    11      2         2           3       2         5
#  =                 Operator    14      1         2           6       2         7
#  6                   Number    16      1         2           8       2         9
#  ...                NewLine    17      1         2           9       3         1
#  write-host         Command    20     10         3           3       3        13
#  $x*$y      CommandArgument    31      5         3          14       3        19
Github repository .NET-API, path: /System/Management/Automation/PSParser/Tokenize/simple.ps1

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Microsof...', 1759526030, '216.73.216.149', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Microsoft/dot-net/namespaces-classes/System/Management/Automation/PSParser/index(61): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78