annotate API with full screen editor language
This commit is contained in:
Родитель
403234718e
Коммит
7aa510c719
|
@ -1678,6 +1678,11 @@ module TDev {
|
|||
this.getDefaultValue = () => AST.Parser.parseExprHolder(s).tokens;
|
||||
}
|
||||
|
||||
public md_lang(s:string)
|
||||
{
|
||||
this.languageHint = s
|
||||
}
|
||||
|
||||
public setDeflStrings(v:string[])
|
||||
{
|
||||
this._stringValues = v;
|
||||
|
@ -1706,6 +1711,7 @@ module TDev {
|
|||
|
||||
public _kind:Kind;
|
||||
public parentProperty:IProperty;
|
||||
public languageHint:string;
|
||||
private _stringValues: string[];
|
||||
private _stringValueArtIds: StringMap<string>;
|
||||
public _flags:ParameterFlags = 0;
|
||||
|
|
|
@ -3044,6 +3044,7 @@ module TDev.AST {
|
|||
extends Token
|
||||
{
|
||||
public loc:StackOp;
|
||||
public languageHint:string;
|
||||
|
||||
constructor() {
|
||||
super()
|
||||
|
|
|
@ -1905,6 +1905,7 @@ module TDev.AST
|
|||
this.typeCheckExpr(args[i]);
|
||||
} else {
|
||||
this.expectExpr(args[i], inP[i].getKind(), prop.getName(), i == 0);
|
||||
args[i].languageHint = inP[i].languageHint
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1238,7 +1238,8 @@ module TDev
|
|||
private inlineEditString(l:AST.Literal)
|
||||
{
|
||||
var opts : HTML.AutoExpandingTextAreaOptions = { showDismiss: true };
|
||||
if (Browser.isDesktop && TheEditor.widgetEnabled("stringEditFullScreen")) opts.editFullScreenAsync = (t) => EditorHost.editFullScreenAsync('', t);
|
||||
if (Browser.isDesktop && TheEditor.widgetEnabled("stringEditFullScreen"))
|
||||
opts.editFullScreenAsync = (t) => EditorHost.editFullScreenAsync(l.languageHint ? 'inline.' + l.languageHint : '', t);
|
||||
var res = HTML.mkAutoExpandingTextArea(opts)
|
||||
res.div.className += " calcStringEdit";
|
||||
res.textarea.value = l.data;
|
||||
|
|
|
@ -821,6 +821,7 @@ module TDev.RT {
|
|||
|
||||
//? When exported, run `script` instead of the body of the action
|
||||
//@ [calling_convention].defl("local")
|
||||
//@ [script].lang("js")
|
||||
export function javascript(calling_convention:string, script:string) : void
|
||||
{
|
||||
}
|
||||
|
@ -828,6 +829,7 @@ module TDev.RT {
|
|||
//? When exported, run `script` instead of the body of the action
|
||||
//@ async
|
||||
//@ [calling_convention].defl("local")
|
||||
//@ [script].lang("js")
|
||||
export function javascript_async(calling_convention:string, script:string, r:ResumeCtx) : void
|
||||
{
|
||||
r.resume()
|
||||
|
|
|
@ -512,6 +512,7 @@ module TDev.RT {
|
|||
export function url_encode(text:string) : string { return encodeURIComponent(text); }
|
||||
|
||||
//? Parses the string as a json object
|
||||
//@ [value].lang("json")
|
||||
export function json(value: string): JsonObject
|
||||
{
|
||||
return JsonObject.mk(value, function (msg) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче