StringConstant

A string of characters enclosed in apostrophes or quotes, an expr node.

声明

语法

StringConstant(string s, ttype type)

参数

Argument Name

Argument Description

s

value of string

type

table entry type

返回值

The return value is the expression that the StringConstant represents.

描述

StringConstant represents string constant. Each character string constant appearing outside a DATA statement is followed by a null character to ease communication with C routines.

类型

Only accepts 1 or more characters.

示例

"string"

ASR:

(TranslationUnit
    (SymbolTable
        1
        {

        })
    [(StringConstant
        "string"
        (Character 1 6 () [])
    )]
)

也可以看看

IntegerConstant, RealConstant