Selfie
Loading...
Searching...
No Matches
selfie_lib.Literals.LiteralRepr Class Reference
Inheritance diagram for selfie_lib.Literals.LiteralRepr:
selfie_lib.Literals.LiteralFormat

Public Member Functions

str encode (self, Any value, Language language, EscapeLeadingWhitespace encoding_policy)
 
Any parse (self, str string, Language language)
 

Detailed Description

Definition at line 222 of file Literals.py.

Member Function Documentation

◆ encode()

str selfie_lib.Literals.LiteralRepr.encode (   self,
Any  value,
Language  language,
EscapeLeadingWhitespace  encoding_policy 
)

Reimplemented from selfie_lib.Literals.LiteralFormat.

Definition at line 223 of file Literals.py.

228 ) -> str:
229 if isinstance(value, int):
230 return _encode_int_underscores(io.StringIO(), value)
231 else:
232 return repr(value)
233

◆ parse()

Any selfie_lib.Literals.LiteralRepr.parse (   self,
str  string,
Language  language 
)

Reimplemented from selfie_lib.Literals.LiteralFormat.

Definition at line 234 of file Literals.py.

234 def parse(self, string: str, language: Language) -> Any:
235 raise NotImplementedError
236
237

The documentation for this class was generated from the following file: