CodeParser`
CodeParser`

CodeTokenize

CodeTokenize["code"]

tokenizes a string of WL code returning a list of tokens.

CodeTokenize[File[src]]

tokenizes a file of WL code returning a list of tokens.

更多信息和选项

  • CodeTokenize has these options:
  • "FileFormat"Automaticspecific format to assume for code file
    SourceConvention"LineColumn"convention to use for Source metadata

范例

打开所有单元关闭所有单元

Options  (2)

"FileFormat"  (1)

Automatic

XXX "Script"

SourceConvention  (1)

"LineColumn"

"SourceCharacterIndex"

Possible Issues  (1)

  • A string representing a file path is treated as code.
  • File paths must use the File wrapper.